Executable jar file don't gives result on double click

Executable jar file don't gives result on double click

Page 1 of 1

8 Replies - 3502 Views - Last Post: 08 January 2011 - 04:09 AM Rate Topic: -----

#1 Guest_kirti.adsul*


Reputation:

Executable jar file don't gives result on double click

Posted 06 January 2011 - 10:36 PM

Hi,

on double click Executable jar file (c:\CRDO_Sys.jar) it gives error .I have open jar file in Java™ Platform SE.

error is :

Exception in main thread java.lang.NoclassDefFountError:c:\CRDO_Sys.jar
java.lang.ClassNotFoundException:c:\CRDO_Sys.jar

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Is This A Good Question/Topic? 0

Replies To: Executable jar file don't gives result on double click

#2 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2684
  • View blog
  • Posts: 11,343
  • Joined: 20-September 08

Re: Executable jar file don't gives result on double click

Posted 07 January 2011 - 03:30 AM

Does the following work at the command line?

java -jar c:\CRDO_Sys.jar

Was This Post Helpful? 0
  • +
  • -

#3 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 1949
  • View blog
  • Posts: 4,048
  • Joined: 11-December 07

Re: Executable jar file don't gives result on double click

Posted 07 January 2011 - 04:32 AM

I get a similar error message when I try and run a JAR file without the -jar flag. Are you sure you have set up your OS (windows?) properly?

>java Jmol.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Jmol/jar
Caused by: java.lang.ClassNotFoundException: Jmol.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)
Could not find the main class: Jmol.jar.  Program will exit.

Was This Post Helpful? 0
  • +
  • -

#4 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2684
  • View blog
  • Posts: 11,343
  • Joined: 20-September 08

Re: Executable jar file don't gives result on double click

Posted 07 January 2011 - 04:51 AM

Quote

I get a similar error message when I try and run a JAR file without the -jar flag.


Well that of course is quite an illegitimate command ;)
Was This Post Helpful? 0
  • +
  • -

#5 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2684
  • View blog
  • Posts: 11,343
  • Joined: 20-September 08

Re: Executable jar file don't gives result on double click

Posted 07 January 2011 - 05:04 AM

Check out the 'DOS' commands ftype and assoc for the jar extension
Was This Post Helpful? 1
  • +
  • -

#6 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 1949
  • View blog
  • Posts: 4,048
  • Joined: 11-December 07

Re: Executable jar file don't gives result on double click

Posted 07 January 2011 - 05:55 AM

Are you trying to help me or kirti? I was just trying to pinpoint his problem.
Was This Post Helpful? 0
  • +
  • -

#7 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2684
  • View blog
  • Posts: 11,343
  • Joined: 20-September 08

Re: Executable jar file don't gives result on double click

Posted 07 January 2011 - 06:19 AM

Quote

Are you trying to help me or kirti?


Kirti
Was This Post Helpful? 1
  • +
  • -

#8 kirti.adsul  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 02-November 10

Re: Executable jar file don't gives result on double click

Posted 08 January 2011 - 04:06 AM

View Postg00se, on 07 January 2011 - 02:30 AM, said:

Does the following work at the command line?

java -jar c:\CRDO_Sys.jar



yes but it need to go bin folder for running i.e
c:\program files\java\jdk1.6.0_22\bin>java -jar c:\CRDO_Sys.jar


Was This Post Helpful? 0
  • +
  • -

#9 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2684
  • View blog
  • Posts: 11,343
  • Joined: 20-September 08

Re: Executable jar file don't gives result on double click

Posted 08 January 2011 - 04:09 AM

You need to add the java bin directory to PATH. See 'Environment Variables' in Windows help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1