sliders_alpha
sliders_alpha

Reputation: 2454

Can't install maven

I set up all my environment variable correctly but I'm getting a weird error, there is no match on google for the class name (which is just giberish)

So I added the 2 required environment variable :

JAVA_HOME   C:\programs\Java\jdk1.6.0_41
M2_HOME     C:\dev\apache-maven-3.0.4

And added this at the end of the variable PATH
;%JAVA_HOME%\bin;%M2_HOME%\bin

And when running mvn --version I get :

Exception in thread "main" java.lang.NoClassDefFoundError: ûXX
Caused by: java.lang.ClassNotFoundException: ûXX
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: ÔÇôXX.  Program will exit.

The weird thing is that I get exactly the same thing on 2 totally different computers. I tried with old file that I already had and freshly downloaded files.

I don't get it.

Upvotes: 2

Views: 2705

Answers (2)

Bob Tatykul
Bob Tatykul

Reputation: 1

when passing maven path try to come in to maven package and get path, I had a maven package inside of maven package,so my path is C:\apache-maven-3.6.0\apache-maven-3.6.0. it is work on my computer.

Upvotes: 0

user1092126
user1092126

Reputation:

This works on my PC with Win7 64x OS:

JAVA_HOME  c:\Program Files (x86)\Java\jdk1.6.0_21
J2_HOME    c:\Program Files (x86)\Java\jdk1.6.0_21\bin
M2_HOME    c:\Program Files (x86)\apache-maven-3.1.0
PATH       ...;%M2_HOME%\bin;%J2_HOME%

Sometimes, when we want get PATH without spaces, we can use this trick:

'Progra~1' instead of 'Program Files'
'Progra~2' instead of 'Program Files (x86)'
 and etc

This is old DOS filenames style: 8+3 - where 8 chars for name and 3 for extension (if it present)

This works on old Win machines

Upvotes: 1

Related Questions