0

I have been using the following command from this website :

java -Xbootclasspath:/C:/Program Files (x86)/Java/jdk1.6.0_35/jre/lib/rt.jar;jar/batik-all.jar;jar/xml-apis-ext.jar -javaagent:target/javacg-0.1-SNAPSHOT-dycg-gent.jar="incl=org.apache.batik.*,org.w3c.*;" -jar dacapo-9.12-bach.jar batik

and I am getting the following error

Error occurred during initialization of VM java/lang/NoClassDefFoundError:java/lang/Object

I have tried the following:

1)my java-version is perfectly working and I can run other programs as well.

2)there is no java.exe file in C:/Windows/System32

3)I reinstalled java

4)I have rt.jar in the specified folder and the rt.jar file is unpacked

Any help would be great!

Thanks :)

ntalbs
  • 28,700
  • 8
  • 66
  • 83
Srinu
  • 1,519
  • 2
  • 11
  • 10
  • 2
    Possible duplicate of [JRE 1.7 returns: java/lang/NoClassDefFoundError: java/lang/Object](http://stackoverflow.com/questions/11808829/jre-1-7-returns-java-lang-noclassdeffounderror-java-lang-object) – Prashant Mar 23 '16 at 10:34
  • Nope, I tried the answers said there. Please read my description! – Srinu Mar 23 '16 at 10:47

1 Answers1

0

I think the problem is because of spaces in the path to rt.jar file.

Try surrounding it with doublequotes as below:

java -Xbootclasspath:"C:/Program Files (x86)/Java/jdk1.6.0_35/jre/lib/rt.jar";jar/batik-all.jar;jar/xml-apis-ext.jar -javaagent:target/javacg-0.1-SNAPSHOT-dycg-gent.jar="incl=org.apache.batik.*,org.w3c.*;" -jar dacapo-9.12-bach.jar batik