File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdk 1.4 after jdk 1.5 with tomcat 5

 
Claudia Fontan
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one on this topic??
Please, it's REALLY important!!
 
miguel lisboa
Ranch Hand
Posts: 1281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i typed javac and found this:
-source <release> Provide source compatibility with specified release

did you meant searching in other places?
 
Claudia Fontan
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, with the fantastic "-target" option I finally solved the problem!!

Thanks to everyone!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic