This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Aditi agarwal wrote:i am using java EE 5.0 during struts program &
If you are using eclipse check the "Java Compiler Compliance level", check the version JDK libraries, Please make sure that JDK supports your source code, if any of the predefnied class files imported are not supported with JDK you use then you will get this error
I am not sure for MyEclipse but in Eclipse i do this way,Right click on the project, select Properties,then select Java Compiler from the list shown , check the version the compiler uses. Then Click java build path, check whether the required JDK library is added.
I think this is related to something like class being compiled with the JDK that has higher version(say 1.6) than the one you are trying to run the class on(say 1.5).
Backward compatibility is always there so class compiled using 1.4 as in your case should run fine on the Java EE 5.
What version of Struts you are using? I am not sure if Struts 2 can work with JDK 1.4 as I havent worked with it yet.