Results 1 to 3 of 3
  1. #1
    Moses76 is offline Member
    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Default UnsupportedClassVersionError

    [QUOTE=pbrockway2;90391]The following works for me (hw.jar just prints hello world to the console).

    [code]
    @echo OFF
    java -jar g:\hw.jar
    pause

    I tried this and it gives me this message:-- please please help..

    Exception in thread "main" java.lang.UnsupportedClassVersionError: cmdb/MainForm

    : Unsupported major.minor version 51.0

    at java.lang.ClassLoader.defineClass1(Native Method)

    at java.lang.ClassLoader.defineClassCond(Unknown Source)

    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$000(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)

    Could not find the main class: cmdb.MainForm. Program will exit.

    Press any key to continue . . .
    Thats all it does .

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

    Default Re: Double-clicking .jar files?

    You've compiled in Java 1.7 (that's the '51' in the error message), but are trying to run in an earlier version of Java.
    Last edited by Tolls; 05-18-2012 at 03:46 PM. Reason: typo
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,247
    Rep Power
    19

    Default Re: UnsupportedClassVersionError

    Moses76, don't post to old dead threads and don't hijack another poster's thread, especially with an unrelated question. Your problem has nothing at all to do with the question asked and answered in Double-clicking .jar files?

    Whenever you have a question, start a new thread; they're free.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 14
    Last Post: 04-18-2011, 10:44 AM
  2. java.lang.UnsupportedClassVersionError
    By gskn4u in forum New To Java
    Replies: 10
    Last Post: 10-03-2009, 04:20 PM
  3. Replies: 2
    Last Post: 12-02-2008, 11:01 AM
  4. java.lang.UnsupportedClassVersionError
    By bbq in forum Advanced Java
    Replies: 1
    Last Post: 07-05-2007, 04:05 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
  •