Results 1 to 2 of 2

Thread: Java driving me crazy!

  1. #1
    Join Date
    Aug 2012
    Beans
    1

    Angry Java driving me crazy!

    Hello gentlemen I am having an issue with Java and have been for days now. I am trying to run a .jar program (obviously) and nothing happends. However when I run java -jar jarfile.jar I get this print out. UnsupportedClassVersionError: project1/MainProject : Unsupported major.minor version 51.0.

    I have tried uninstalling openJDK6 and reinstalling. I have tried installing openJDK7 with and without JDK6. I have tried oasisJAVA 7u5. Nothing has worked for me so far. Thank you for the future efforts.

  2. #2
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,084
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Java driving me crazy!

    As I understand it, " Unsupported major.minor version 51.0" means that the jar was compiled with Java 7 and you are attempting to run it with an earlier JDK, presumably 6.

    If you have a Java 7 JDK installed and
    Code:
    java -version
    shows 1.7something, then
    Code:
     java -jar jarfile.jar
    should work, but if
    Code:
    java -version
    does not show 1.7something, then the jar won't work.

    If it doesn't work with a Java 7 JDK, then post the version string (using the above command). Is the jar downloadable from somewhere? Does it come with any requirement instructions?

Tags for this Thread

Bookmarks

Posting Permissions

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