Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: using eclipse on fedora

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Location
    India
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default using eclipse on fedora

    I am new user on fedora (release: 8 codename: werewolf kernel linux 2.6.23.1-42.fc8 GNOME 2.20.1),
    while doing java program got error,

    Error:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: HelloWorld : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java :638)
    at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:143)
    at java.net.URLClassLoader.defineClass(URLClassLoader .java:281)
    at java.net.URLClassLoader.access$000(URLClassLoader. java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 216)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:209)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 24)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 69)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:337)
    Error: Could not find the main class.
    Error: A JNI error has occurred, please check your installation and try again


    program:
    public class HelloWorld {

    public static void main(String[] args) {
    System.out.println("Hello, World");
    }

    }


    this error is there in other programs also,
    please tell me what is wrong.


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: using eclipse on fedora

    I've never used Fedora. But looking through the exception trace, i can conclude that it can not find the main class. So, this leads to the question if you have set the environment variables as you do in windows xp, windows 7 etc. If not, read the manual on setting the environment variables in Fedora.

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Location
    India
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: using eclipse on fedora

    This problem is solved ,
    i am not sure but what i did is , i installed the jdk again .
    this problem was may be because of not installing jdk properly .

    thank you Mr.777,

    lanpan.

Similar Threads

  1. Replies: 24
    Last Post: August 4th, 2014, 12:49 PM
  2. Beginners Eclipse Tutorial. How to run first java application on Eclipse?
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 13
    Last Post: June 24th, 2011, 12:26 AM
  3. Help with Eclipse
    By Graham Montgomery in forum Java IDEs
    Replies: 1
    Last Post: April 29th, 2011, 09:07 AM
  4. eclipse help
    By mos33 in forum Java IDEs
    Replies: 3
    Last Post: November 24th, 2009, 02:10 PM