-1

Possible Duplicate:
How to set a java compiler in Netbeans

I m getting the following stack-trace when i changed my jdk version in netbeans from jdk6 to 7....

java.lang.UnsupportedClassVersionError: WEB9032: Class
com.hcdc.coedp.safe.controller.GatewayController has unsupported major or 
minor version numbers, which are greater than those found 
in the Java Runtime Environment version 1.6.0_32

I am using glassfish 3.1.2 and spring framework. Plz help me out.

Edit: I have edited the jdk version in glassfish asenv.bat file to jdk 7 now also getting the same error.

Community
  • 1
  • 1
Dangling Piyush
  • 3,658
  • 8
  • 37
  • 52

2 Answers2

1

It appears that you are compiling with JDK 1.7 but you are running with JDK (or JRE) 1.6 (ref http://goo.gl/Qsmn9).

I suggest you to check which version of JDK uses GlassFish.

Dario
  • 5,203
  • 1
  • 23
  • 26
  • i was previously using jdk 1.6 but now i want to upgrade to jdk 1.7 and i m getting this error while upgrading.. – Dangling Piyush Jul 17 '12 at 09:29
  • @Dario it appears that you just copied the answer from here: http://home.java.net/forum/topic/glassfish/glassfish/javalangunsupportedclassversionerror-web9032-class-authenticationloginbean-has-unsupported-maj-0. Please cite your answers. – Paulius Matulionis Jul 17 '12 at 09:30
  • @DanglingPiyush: I had the same problem when I switched to jdk 7 and the problem resided in the widzard as linked in the reference. – Dario Jul 17 '12 at 09:37
  • @Dario now m running glassfish with jdk 1.7 only than also it is not working i have already edited the question. – Dangling Piyush Jul 17 '12 at 09:42
  • that message state com.hcdc.coedp.safe.controller.GatewayController is compiled with another version of JDK. Is that class compiled for runtime env 7? – Dario Jul 17 '12 at 09:50
  • @Dario yeah i have clean-build it again after changing to jdk 7. – Dangling Piyush Jul 17 '12 at 09:58
1

Solved this by changing the default jdk in netbeans to JDK 7 ...this needs re-installaion of netbeans with env variable pointing to jdk7 installation. Thanks.

Dangling Piyush
  • 3,658
  • 8
  • 37
  • 52