Problem is fixed. But i am quite puzzled by this behavior. Please help me in reasoning out.
I have jdk 3 places in my places
1. One i downloaded earlier - C:\j2sdk1.4.2 (jdk version - 1.4.2)
2. Another got installed on installing oracle - C:\Oracle\product\10.1.0\Client_1\jdk (jdk version 1.4.2)
3. Another got installed on installing
j2ee sdk - C:\Sun\AppServer\jdk (jdk version 5.0)
I have 2 environment variables pointing to jdk - Path and JAVA_HOME
I am trying to run a web application which runs on tomcat server. Tomcat refers JAVA_HOME variable for jdk reference. Oracle uses Path environment variable for jdk reference.
I like to have both of them to point to same jdk so there wont be any problem.
If i make both of them to point to Oracle jdk as given below
Path - C:\Oracle\product\10.1.0\Client_1\bin;
JAVA_HOME - C:\Oracle\product\10.1.0\Client_1\jdk
Oracle is working and my web application gives the following error
java.lang.UnsupportedClassVersionError: org/apache/jsp/jsp/index_jsp (Unsupported major.minor version 49.0)
If i make changes as given below,
Path - C:\Oracle\product\10.1.0\Client_1\bin;
JAVA_HOME - C:\Sun\AppServer\jdk
Both Oracle and web application is working.
Please let me know why it is giving error saying unsupported version if i make both of them same.