LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Jar file running problem (https://www.linuxquestions.org/questions/slackware-14/jar-file-running-problem-700506/)

netpumber 01-28-2009 09:22 AM

Jar file running problem
 
Hi!! Trying to run a .jar file by typing
Code:

java file.jar
and returns this back:

Code:

Exception in thread "main" java.lang.NoClassDefFoundError: file/jar
Caused by: java.lang.ClassNotFoundException: file.jar
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

And if i type this :

java file.jar it returns this :

Code:

Unable to access jarfile
Does anyone know why this prog can not run ? :s Thanx for your any answers...

astrogeek 01-28-2009 11:42 AM

Quote:

Originally Posted by netpumber (Post 3424044)
Hi!! Trying to run a .jar file by typing
Code:

java file.jar

should be...

Code:

java -jar file.jar


All times are GMT -5. The time now is 09:23 PM.