Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By Tolls

Thread: Questin about error

  1. #1
    Magnetto is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Questin about error

    Hello,

    I'm testing some java compilations and I have the following problems.

    When I execute the .jar file.


    C:\Users\Alex\Desktop>java -jar Test.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: de/stefan1200
    vermod/JTS3ServerMod (wrong name: JTS3ServerMod)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    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 sun.launcher.LauncherHelper.checkAndLoadMain(Unkno wn Source)

    Am a newbie


    Greetings,

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,172
    Rep Power
    20

    Default Re: Questin about error

    Your Test.jar does not have that class in it, but does have one not in a package.
    What does the manifest look like?
    Fubarable likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Magnetto is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Re: Questin about error

    This is my Test.jar
    Attached Thumbnails Attached Thumbnails Questin about error-imged.png  

  4. #4
    Magnetto is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Re: Questin about error

    Now I get this error:
    In Windows work fine.
    However in Linux does not work.


    The other error now is fix

    Exception in thread "main" java.lang.ClassFormatError: de.stefan1200.jts3serverm od.JTS3ServerMod (unrecognized class file version)
    at java.lang.VMClassLoader.defineClass(libgcj.so.10)
    at java.lang.ClassLoader.defineClass(libgcj.so.10)
    at java.security.SecureClassLoader.defineClass(libgcj .so.10)
    at java.net.URLClassLoader.findClass(libgcj.so.10)
    at java.lang.ClassLoader.loadClass(libgcj.so.10)
    at java.lang.ClassLoader.loadClass(libgcj.so.10)
    at gnu.java.lang.MainThread.run(libgcj.so.10)
    Last edited by Magnetto; 05-01-2012 at 08:40 PM.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,172
    Rep Power
    20

    Default Re: Questin about error

    Nothing to do with Windows or Linux, and everything to do with the version of Java on each of those machines.
    Your code was compiled on a version higher than the one you are attempting to run it on.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. java out of memory error-heap space error
    By elsanthosh in forum NetBeans
    Replies: 4
    Last Post: 06-15-2010, 10:31 AM
  2. Replies: 1
    Last Post: 03-10-2010, 02:53 PM
  3. Replies: 1
    Last Post: 12-05-2009, 08:28 AM
  4. Replies: 1
    Last Post: 10-26-2009, 05:38 PM
  5. Replies: 3
    Last Post: 01-23-2009, 09:53 AM

Posting Permissions

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