| Author |
error in struts program
|
Aditi agarwal
Ranch Hand
Joined: Feb 23, 2011
Posts: 225
|
|
i am doing a project in tsruts problem is that sometimes it gives error
please tell me what this error can be
|
 |
Deepakkumar Devarajan
Ranch Hand
Joined: Apr 19, 2011
Posts: 50
|
|
|
Check the version of JDK that is trying to execute your code, It might be the unsupported version of the source code
|
Regards,
Deepakkumar Devarajan
|
 |
Aditi agarwal
Ranch Hand
Joined: Feb 23, 2011
Posts: 225
|
|
@ deepak thanks for your reply
i am using java EE 5.0 during struts program &
jdk1.5.0_09
|
 |
Deepakkumar Devarajan
Ranch Hand
Joined: Apr 19, 2011
Posts: 50
|
|
Aditi agarwal wrote:i am using java EE 5.0 during struts program &
jdk1.5.0_09
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
|
 |
Aditi agarwal
Ranch Hand
Joined: Feb 23, 2011
Posts: 225
|
|
I am using MyEclipse 8.5 please guide me for that
thnak you
|
 |
Deepakkumar Devarajan
Ranch Hand
Joined: Apr 19, 2011
Posts: 50
|
|
|
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.
|
 |
Deepakkumar Devarajan
Ranch Hand
Joined: Apr 19, 2011
Posts: 50
|
|
|
Please check whether all your predfined classes are supported by the current version you use.
|
 |
Aditi agarwal
Ranch Hand
Joined: Feb 23, 2011
Posts: 225
|
|
@deepak thanks for your replie
i have checked the same way you have told in eclipse
my java compiler level is 1.4 &
in java build path all my J2EE 1.4 libraries are already added
now please tell me how to check that my all predefined classes are supported by current version that i use ?
thank you
|
 |
Deepakkumar Devarajan
Ranch Hand
Joined: Apr 19, 2011
Posts: 50
|
|
Just change the compiler level to 1.5,Remove your j2ee 1.4 library and add JDK 1.5 , hope that might resolve the issue..
I am not sure whether a perfect tool exists to find out the JDK version of a class file but you can code for this
|
 |
amit punekar
Ranch Hand
Joined: May 14, 2004
Posts: 488
|
|
Hello,
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.
Regards,
amit
|
 |
Deepakkumar Devarajan
Ranch Hand
Joined: Apr 19, 2011
Posts: 50
|
|
|
@Aditi Any improvement?
|
 |
Aditi agarwal
Ranch Hand
Joined: Feb 23, 2011
Posts: 225
|
|
|
nope deepak no improvement nothing can be done in this case tll now
|
 |
Deepakkumar Devarajan
Ranch Hand
Joined: Apr 19, 2011
Posts: 50
|
|
|
Did you check the versions of your predefined classes? change java compiler level to 1.5 and add JDK 1.5 to build path, remove 1.4.
|
 |
Aditi agarwal
Ranch Hand
Joined: Feb 23, 2011
Posts: 225
|
|
|
i have done every possible change which i can try
|
 |
 |
|
|
subject: error in struts program
|
|
|