JAR files not loading

I’m trying to run Juploader (a flickr uploader) and Jbidwatcher (ebay sniping) but neither run. I get this when I try to run the former:


Exception in thread "main" java.lang.NoClassDefFoundError: com/jgoodies/looks/windows/WindowsLookAndFeel                                
Caused by: java.lang.ClassNotFoundException: com.jgoodies.looks.windows.WindowsLookAndFeel                                              
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Could not find the main class: net.sourceforge.juploader.app.Application. Program will exit.

I installed every type of JGoodies I could find, but still get the same error - what don’t I have? I thought that perhaps having different versions of java installed might be tripping it up, but I don’t want to remove the old versions before asking :slight_smile:

I’m using 11.1 64bit and the multiple javas were all installed by default.

You have to add the path to the jgoodies JAR file, wherever that may be, to the CLASSPATH so that the app can find it. Presumably Juploader and Jbidwatcher would have given you directions on how to do this.

This is a “java.lang.NoClassDefFoundError”. This is slightly different from “java.lang.ClassNotfoundException”. It can happen due to various reasons. Most probably you have one of the following issues:
(1) You classpath or extension directories contain classes/jars that may be providing same classes more than once. For example, you have a jar file that is in the classpath and the application may have already loaded another version via its own class loader.
(2) You have an old version of the application installed earlier in different directories that left behind some different version of the classes/jars that the new application may be loading.

I really have no idea what a classpath is, and both programs don’t give any hints as how to fix it. JBidwatcher says in the FAQ that some Linux distros throw errors and won’t load it, and to just load the proper Sun Java to fix the problem. I’ve done that and still get the same error. :frowning:

I haven’t had old versions installed (it’s a fresh install of 11.1) so I can at least rule that out.

I was not familiar with these 2 programs. So, I downloaded and ran both of them without any problems.

Can you tell me how you tried these program? Post here the command line you used to run it.

Thanks for testing both out. :slight_smile:

JBidwatcher recommends you use this:

java -Xmx512m -jar JBidwatcher-2.0.1.jar

Which returns the error above.

So I did the same with JUploader, and it gives the same error.

I think it is a problem with the JVM vendor. Can you post the output of the following?


java -version

java version “1.6.0_0”
IcedTea6 1.4 (suse-24.4.3-x86_64) Runtime Environment (build 1.6.0_0-b14)
OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

Oh OK. This is the problem. This is the openJDK implementation of Java. It has got problems. Please install the Sun’s Java from the Yast tool and try.

After installing Sun’s Java, just verify:


java -version

You should get something similar to the following:


java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)

Then, do:


java -Xmx512m -jar JBidwatcher-2.0.1.jar

I uninstalled that as you said and now it reports:

java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

This immediately fixed the problem for JBidwatcher, which runs perfectly now except for a jruby error (which doesn’t seem to affect the program) so I’ll install that just to be safe.

I am however still getting an error from JUploader which is still refusing to run:

Exception in thread "main" java.lang.NoClassDefFoundError: com/jgoodies/looks/windows/WindowsLookAndFeel
Caused by: java.lang.ClassNotFoundException: com.jgoodies.looks.windows.WindowsLookAndFeel
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: net.sourceforge.juploader.app.Application. Program will exit.

(1) JBidwatcher
You may install JRuby so that the extra error you are getting might go away. I don’t know if that is really needed because the program was running OK without it. It may be used for some specific functionality.

(2) JUploader
I have gone through the working of this program in detail. Unfortunately, it is written in a bad way. Extra classes are loaded in a proprietary manner. However, you can make it work in the following way (assuming that you downloaded the file juploader.tar.gz in some directory and you are in that directory now):


tar xzf juploader.tar.gz
cd juploader
java -jar JUploader.jar

It will work this way (only from the directory where the tar.gz was extracted into) because it is expecting a couple of jar files in the lib directory below the extracted directory.

That worked a charm, thanks for all your help. :smiley: