Strange error running maven
I unzipped the distribution, I created MAVEN_HOME and I put the bin in the path. When I run "mvn -version" or "mvn --version" I get the error:
Erroroccurred durint initialization of JVM
I googled and found that the error can occur if for some ungodly reason java.exe is copied to Windows/System32. That was happening to me and I deleted the java files; I also put the maven bin at the beginning of path. But the problem persists.
Your help will be greatly appreciated,
Re: Strange error running maven
"I googled and found that the error can occur if for some ungodly reason java.exe is copied to Windows/System32"
That is 'default java' behavior so you can run Java anywhere without having to add it to the system PATH; it is perfectly normal. What I can imagine is that it happens when you still have a java.exe in your system32 folder, but no longer any proper Java runtime for it to use, or the runtime/JDK was moved in an improper way. The path to the 'default' runtime that the java.exe will look for is stored in the windows registry.
Try two things:
a) add the bin directory of your JDK to the PATH
b) add a JAVA_HOME variable which points to your JDK
Be sure to reboot a command prompt so the changes go in effect.