• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strange error running Maven

 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
That new kid is a freak. Show him this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic