Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange error running Maven

 
Alejandro Barrero
Ranch Hand
Posts: 335
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I unziped the maven distribution, added bin to the path and created the variable MAVEN_HOME. I am running "mvn -version" but I get the error:
Error occurred during initialization of JVM
java/lang/NoClassDefFoundError: java/lang/object
Googling I found that this error can occur if java.exe has been copied to Window/System23. Unbelivable, it had happen; I deleted the file and other java files, but the problem persisted. I put the java bin at the beginning of the path to no avail; the problem is still there. It is not happening with other applications.

Your help will be greatly appreciated,

Alejandro Barrero
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try restarting DOS and then typing "java -version" and "path". Is it using the version/location that you want it to be?
 
Alejandro Barrero
Ranch Hand
Posts: 335
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your prompt reply. I have verified that "java -version" works and I have restarted DOS and rebooted my computer. I am using Java 7. Is there anything I can do in the configuration file?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, there is nothing wrong with java.exe being located in system32, the JRE installer places it there and it should not be causing a conflict (unless there is something else messed up on your system).

My suggestion is to reinstall the latest JDK (uninstall all JDKJs abnd JREs you have currently installed and download the latest JDK 7 from the Oracle web site). Once you have reinstalled it, make sure JAVA_HOME is set properly and that the JDK bin directory is in your path. The open a command prompt and run "java -version" and make sure you get a good result. Then try "mvn -version" again.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic