LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   "-jar not understood" error (https://www.linuxquestions.org/questions/programming-9/jar-not-understood-error-383901/)

rsashish 11-16-2005 11:56 PM

"-jar not understood" error
 
hi buddies..
i was trying 2 execute

java -jar MyJar.jar

when it gave the error like


Warning: -jar not understood. Ignoring.
Exception in thread "main" java.lang.NoClassDefFoundError: MyJar.jar
at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
at __gcj_personality_v0 (/root/java.home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre)
at __libc_start_main (/lib/tls/libc-2.3.3.so)
at _Jv_RegisterClasses (/root/java.home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre)

could nebody help me....vat da problem was?

thanks in advance..

mrcheeks 11-17-2005 05:41 PM

Install java from blackdown.org or java.sun.com and your problem is solved. You are using gcj and it is and incomplete jvm

paulsm4 11-18-2005 02:01 AM

Specify the .jar in your -classpath
 
With the standard (Sun) Java interpreter, there's no such thing as a "-jar" argument.

Instead, you specify the .jar file as part of your classpath.

EXAMPLE:

java -cp myfile.jar MyMainClass


All times are GMT -5. The time now is 10:19 PM.