LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-28-2009, 09:22 AM   #1
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Rep: Reputation: 33
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...

Last edited by netpumber; 01-28-2009 at 11:27 AM.
 
Old 01-28-2009, 11:42 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by netpumber View Post
Hi!! Trying to run a .jar file by typing
Code:
java file.jar
should be...

Code:
java -jar file.jar
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
running .jar files computerages Linux - General 13 08-19-2006 07:59 PM
trouble with JRE 1.5 and running a .jar toaster.waffle Linux - Software 4 06-21-2006 11:33 PM
running a ..jar file under Mandrake 10.0 official Jamel75 Linux - Software 5 09-07-2004 12:48 PM
Probs running .jar file via CGI script under Apache blimbo Programming 1 07-22-2004 10:29 AM
Installing Java running jar files jariep Red Hat 1 04-12-2004 11:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration