Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: JAR files not loading

  1. #1

    Default 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:
    Code:
    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

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

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: JAR files not loading

    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.

  3. #3
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: JAR files not loading

    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.
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  4. #4

    Default Re: JAR files not 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.

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

  5. #5
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: JAR files not loading

    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.
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  6. #6

    Default Re: JAR files not loading

    Thanks for testing both out.

    JBidwatcher recommends you use this:

    Code:
    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.

  7. #7
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: JAR files not loading

    I think it is a problem with the JVM vendor. Can you post the output of the following?
    Code:
    java -version
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  8. #8

    Default Re: JAR files not loading

    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)

  9. #9
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: JAR files not loading

    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:
    Code:
    java -version
    You should get something similar to the following:
    Code:
    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:
    Code:
    java -Xmx512m -jar JBidwatcher-2.0.1.jar
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  10. #10

    Default Re: JAR files not loading

    I uninstalled that as you said and now it reports:
    Code:
    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:
    Code:
    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.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •