- This topic has 3 replies, 2 voices, and was last updated 18 years, 11 months ago by
Riyad Kalla.
-
AuthorPosts
-
afrassoMemberHello all, and thanks in advance for your help.
I’m developing a small J2EE application for my company. This is my first opportunity to work with J2EE, so I’m trying to take advantage of that to learn as much as I can. I’m using JBoss 4.0.4 as my application server, and I’m using Struts 1.2.9 as well.
I’ve set everything up to use the Java 5 SDK (as far as I know, I only need to do this in two places: in the Java Compiler settings and the Java Build Path settings).
Unfortunately, I’m getting a somewhat frustrating warning, that I can’t seem to solve, and it leads me to believe that I’ve missed a setting somewhere else, or worse, that one of the libraries I’m using somewhere isn’t compatible with Java 5.0. Here is the warning:
Run-time exception java.lang.UnsupportedClassVersionError occurred during validation. The validator being run was JSP Validator and the message thrown was com/emptoris/projectstatus/model/Project (Unsupported major.minor version 49.0).
Any ideas of what I might be doing wrong?
Thanks for all of your help,
Regards,
Anthony FrassoAugust 21, 2006 at 5:04 pm #257291
Riyad KallaMemberI’ve set everything up to use the Java 5 SDK (as far as I know, I only need to do this in two places: in the Java Compiler settings and the Java Build Path settings).
That should be good.
Run-time exception java.lang.UnsupportedClassVersionError occurred during validation. The validator being run was JSP Validator and the message thrown was com/emptoris/projectstatus/model/Project (Unsupported major.minor version 49.0).
What version of MyEclipse and Eclipse are you using? The problem here is that some Java 1.4 compiler is trying to compile Java 1.5 code and dying. For a quick fix, try and force MyEclipse (or Eclipse) to be run with JDK 1.5 by editing the eclipse.ini file in the Eclipse folder and add “-vm c:\path\to\jdk\bin\javaw.exe” to the top of the file, where you actually put the entire path to the javaw.exe file in there. That line needs to go before the -vmargs line and after the -clean line if you have it in there.
August 22, 2006 at 9:18 am #257358
afrassoMemberThanks for the help! My JAVA_HOME environment variable was set to home directory of my JDK 1.4 installation. I changed it to the home directory of my JDK 5.0 installation, modified the eclipse.ini file, restarted the computer and then cleaned by workspace in Eclipse… then it worked. 🙂 In the future, I’ll be careful to change the JAVA_HOME path to point to the JDK 5.0 home directory before opening Eclipse.
My version of Eclipse is 3.1.2, and my version of MyEclipse is 4.1.1 GA, in case you were curious.
Again, thanks for your help.
Regards,
Anthony FrassoAugust 22, 2006 at 2:21 pm #257395
Riyad KallaMemberOhh yes this explains it, with version 4.1 of MyEclipse your “javac” executable is used to validate the JSP pages, in version 5.0 and later we use the internal JDT compiler so it will respect your project settings.
-
AuthorPosts