Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/harvard/hul/ois/fits/Fits : Unsupported major.minor version 51.0

115 views
Skip to first unread message

Brad Spry

unread,
Sep 29, 2014, 1:49:24 PM9/29/14
to fits-...@googlegroups.com
Freshly cloned installation using:

java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

./fits.sh
Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/harvard/hul/ois/fits/Fits : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: edu.harvard.hul.ois.fits.Fits.  Program will exit.

Tyler Thorsted

unread,
Sep 29, 2014, 2:53:44 PM9/29/14
to fits-...@googlegroups.com
I get the same error as well.

java -version

java version "1.6.0_65"

Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)

Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Brad Spry

unread,
Sep 29, 2014, 3:17:23 PM9/29/14
to fits-...@googlegroups.com
Tyler, could you post the detailed error output after running ./fits.sh?


<B

Bjarne Andersen

unread,
Sep 29, 2014, 3:40:24 PM9/29/14
to fits-...@googlegroups.com
did you build the fits.jar yourself or did you just run fits.sh (which uses the fits.jar that is already in the git-repository) ?
looks like the fits.jar in the git-repo has been build with another java version (maybe java 7 ?)
building fits.jar from the sourcecode should always be the best solution (IMHO fits.jar should not be distributed in the source-code repository)

best
Bjarne Andersen
--
You received this message because you are subscribed to the Google Groups "fits-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fits-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tyler Thorsted

unread,
Sep 29, 2014, 3:41:40 PM9/29/14
to fits-...@googlegroups.com
./fits.sh -i RELEASE.txt 
Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/harvard/hul/ois/fits/Fits : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

I seem to get the same error in fits 0.8.2 and 0.8.3

Tyler Thorsted

unread,
Sep 29, 2014, 3:51:46 PM9/29/14
to fits-...@googlegroups.com
Bjarne,

Is there a help file somewhere which can help us compile the fits.jar on our system?

Thanks.

Brad Spry

unread,
Sep 29, 2014, 4:15:34 PM9/29/14
to fits-...@googlegroups.com
Bjarne,

Your intuition is correct, I just ran fits.sh against the jar included from the git-repository...

Moving forward, from my local fits directory, I've now ran:

1. ant clean
2. ant compile

Now I can successfully run fits.sh:
./fits.sh -i RELEASE.txt -o RELEASE.txt.fits

...and get the desired result!

Tyler Thorsted

unread,
Sep 29, 2014, 4:28:44 PM9/29/14
to fits-...@googlegroups.com
Thanks Brad!

Dave Siegel

unread,
Sep 29, 2014, 5:25:50 PM9/29/14
to fits-...@googlegroups.com
The latest fits should be run under Java 7.

Thanks,

Dave
Reply all
Reply to author
Forward
0 new messages