Results 1 to 3 of 3
  1. #1
    handro1104 is offline Member
    Join Date
    Feb 2011
    Posts
    6
    Rep Power
    0

    Default 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
    java/lang/NoClassDefFoundError: java/lang/object
    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,

    Alejandro Barrero

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default 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.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    gvs048 is offline Member
    Join Date
    Apr 2013
    Posts
    16
    Rep Power
    0

Similar Threads

  1. Replies: 1
    Last Post: 04-23-2013, 04:56 PM
  2. Strange Error
    By willemien in forum AWT / Swing
    Replies: 24
    Last Post: 04-19-2013, 07:26 PM
  3. Running my own Maven repo
    By kjkrum in forum Apache Maven
    Replies: 1
    Last Post: 03-18-2013, 08:17 AM
  4. maven build error for JSP files
    By devip in forum Apache Maven
    Replies: 0
    Last Post: 01-22-2013, 08:59 AM
  5. Strange Error
    By AJArmstron@aol.com in forum New To Java
    Replies: 1
    Last Post: 04-18-2010, 09:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •