[nbusers] Re: Error

  • From: Edson Richter < >
  • To:
  • Subject: [nbusers] Re: Error
  • Date: Tue, 11 Dec 2012 12:13:09 -0200
  • Organization: Simkorp Inform├ítica Ltda

Em 11/12/2012 05:12, Mahesh Thobhani escreveu:
" type="cite">I am using netbeans 7.2.1 in windows 7 OS and i got following error
in every project. please help me hove to solve it.

This error happens because you are trying to run a class compiled with recent version of JDK, using a older version of JDK.

What you can, for example:

- Compile with JDK 5, and run with JDK 5, JDK 6, and JDK 7.

What you can't, for example;

- Compile with JDK 7, and run with JDK 6 or JDK 5.

Now, you can compile with JDK 7 forcing it to target 1.6, so it will run on JDK 6 and 7.

Look in this mail list archives the thread with subject "Cannot execute jar file (Netbeans 7.2.1 Ubuntu 12.04)". It was similar behavior with almost same solution.

King regards,

Edson Richter

" type="cite">

java.lang.UnsupportedClassVersionError: helloworldapp/HelloWorldApp : 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(SecureClassLoader.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.java:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:324)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:269)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:337)
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

[nbusers] Error

Mahesh Thobhani 12/11/2012

[nbusers] Re: Error

Ion Iovu 12/11/2012

[nbusers] Re: Error

Edson Richter 12/11/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 25 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20150226.965aeb8). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm