Menu

Problem: UnsupportedClassVersionError

Help
2006-07-26
2013-05-23
  • Filipe Silveira

    Filipe Silveira - 2006-07-26

    I´m receiving the following error:

    Exception in thread "main" java.lang.UnsupportedClassVersionError: br/gov/jt/projetoteste/TesteApp (Unsupported major.minor version 49.0)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:
    450)
            at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:44
    1)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at com.simontuffs.onejar.Boot.run(Boot.java:245)
            at com.simontuffs.onejar.Boot.main(Boot.java:105)

    Is the wrap folder mandatory?

    Obs: I am using Java 1.5.

    Please, how can I solve this?

    Thanks!

    Filipi Silveira

     
    • Filipe Silveira

      Filipe Silveira - 2006-07-26

      The file MANIFEST.MF in the main jar needs to include class-path references to the jars in the lib folder of the top level Jar?

      Filipi

       
      • P. Simon Tuffs

        P. Simon Tuffs - 2006-08-03

        It is not necessary to include class-path references ni the MANIFEST.MF file.  If you do so, these will be references to the filesystem, and should augment the top-level classloader with the jar files you mention, but from the filesystem not from inside the one-jar file (see the writeup on the web-page http://one-jar.sourceforge.net\).

        Simon.

         
    • P. Simon Tuffs

      P. Simon Tuffs - 2006-08-03

      Hello Filipi: 

      This must be due to your using Java 1.5, though I'm surprised that it doesn't work if you are using a 1.5 JVM.  That said, I haven't tested against Java 1.5, I don't have much time to work on One-Jar at the moment. 

      I do have a new release (0.96) in the works.  Could you help me out with a stripped down example that shows the problem.

      Simon.

       
      • Filipe Silveira

        Filipe Silveira - 2006-08-03

        Hello Simon, I’ve got a mistake on the execution. One-Jar(0.95) is working perfectly with JRE 1.5 now.
        Thanks!

        Filipi Silveira

         

Log in to post a comment.