PDA

View Full Version : [ubuntu] problems with eclipse



nngrey
July 9th, 2013, 03:47 AM
I have installed eclipse kepler from the software center. I am now trying to open and run source files from dropbox. These are simple programs (homework for an intro java class) which I created using eclipse in windows or mac os. When I try to open and run the files I get errors like "The import java.util cannot be resolved." Usually the files will not compile or run and I get output like...

Exception in thread "main" java.lang.UnsupportedClassVersionError: FractionScale : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :634)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:277)
at java.net.URLClassLoader.access$000(URLClassLoader. java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 21)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 66)
Could not find the main class: FractionScale. Program will exit.

These are all files that I can run from eclipse on my mac. I just can't run them from eclipse on ubuntu. I am wondering if there is a path issue but can't seem to determine if it is an how to fix it. Any suggestions would be appreciated.

DJRoTec
July 9th, 2013, 12:39 PM
you're probably using two different versions of java jdk. try using the same one on both machines. that should solve the problem