aspose file tools*
The moose likes Servlets and the fly likes jdk 1.4 after jdk 1.5 with tomcat 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "jdk 1.4 after jdk 1.5 with tomcat 5" Watch "jdk 1.4 after jdk 1.5 with tomcat 5" New topic
Author

jdk 1.4 after jdk 1.5 with tomcat 5

Claudia Fontan
Greenhorn

Joined: May 20, 2005
Posts: 4
Hi everyone,

I'm trying to load a web-application on a server with jdk 1.4 and Tomcat 5.0.28.
Firstly I tried to load the whole application compiled with jdk 1.5, but I had the following: javax.servlet.ServletException: (Unsupported major.minor version 49.0)
Then I tried to load the whole application again, now compiled with jdk 1.4.2, but no changes.
I even tried to empty Tomcat work directory, but the problem is still there.
If I try to load my app with MY Tomcat (5.0.19) and jdk 1.4.2, all goes perfectly..what can I do??
Thank you in advance..and sorry for my English..
Claudia Fontan
Greenhorn

Joined: May 20, 2005
Posts: 4
No one on this topic??
Please, it's REALLY important!!
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i know nothing about servlets

onve this said:

Unsupported major.minor version 49.0

means your current JVM is 1.4 (or under) and cant read files (classes) that were compiled with java5


java amateur
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
However, note that there is a compiler flag you can set to force the 1.5 compiler to use a mode compatible with 1.4 and eliminate the problem.
-source 1.4
does the trick. I am using Tomcat 5.5.9, Java 1.5 and compiling with that option.
See the tooldocs for more about compiler options.
Bill
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i typed javac and found this:
-source <release> Provide source compatibility with specified release

did you meant searching in other places?
Claudia Fontan
Greenhorn

Joined: May 20, 2005
Posts: 4
OK, with the fantastic "-target" option I finally solved the problem!!

Thanks to everyone!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdk 1.4 after jdk 1.5 with tomcat 5