Exception in thread "main" java.lang.NoClassD

Subscribe to Exception in thread "main" java.lang.NoClassD 4 post(s), 2 voice(s)

 
Avatar (SF) modnet25 2 post(s)

hi folks,

i downloaded the latest version from here and saved it at the desktop. then is installed the java from java.sun.com and now i have this java version on my pc:

java version “1.4.2_05”
Java™ 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot™ Client VM (build 1.4.2_05-b04, mixed mode)

my CLASSPATH looks like this:
D:\Programme\Java\j2sdk1.4.2_05\bin
and i also tried out this:
D:\Programme\Java\j2re1.4.2_05\bin

All applets in browsers work.
i have win xp sp1.

when executing the following line in cmd.exe

c:\Dokumente und Einstellungen\mod>java JBidWatcher-0.9.3.1

i get constantly this error:

C:\Dokumente und Einstellungen\mod>java JBidWatcher-0.9.3.1.jar
Exception in thread “main” java.lang.NoClassDefFoundError: JBidWatcher-0/9/3/1/j
ar

any ideas what might be wrong?
please help me cause i know the prog and like it very much.

thanks in advance.
modnet25

 
Avatar Morgan Schweers Administrator 1,204 post(s)

Greetings,
The command is:
java -jar JBidWatcher-0.9.3.1.jar

The ‘-jar’ tells Java to run it out of the jar file.

You should also be able to double-click on the .jar file, because the standard Java install adds a handler to Windows allowing automatic execution of .jar files via double-click.

— Morgan Schweers, CyberFOX!

 
Avatar (SF) modnet25 2 post(s)

thanks man, that’s it.
the double click does not work.
may be i can reconfigure my system to do the double click (only if u gimmi a hint :-)) )
thanks a lot

 
Avatar Morgan Schweers Administrator 1,204 post(s)

Greetings,
Very strange! The Java install should automatically add a .jar handler to your registry.

I don’t have a Windows box handy at this moment, but you should be able to look at your registry for the handler for ‘.jar’ files. (It should be in HKLM.) The .jar entry should have a ‘command’ (or something like that) subtree, which should have ‘open’ (or perhaps just the default?) entry which contains an entry like:

java -jar “%1”

or perhaps
D:\Programme\Java\j2sdk1.4.2_05\bin\java.exe -jar “%1”

If that’s not there, it might have a ‘jarfile’ reference, and then under the same area, you’d find ‘jarfile’, which again would have a command like that in it.

If you chose advanced or custom setup of the Java SDK, you might have not selected ‘associate with .jar files’, or something.

I hope this mostly random collection of thoughts helps…!

— Morgan Schweers, CyberFOX!