• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP - Bad version number in .class file

 
Zyad Sherif
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I was following this tutorial http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/livecycle/pdfs/live_stock_quote_app.pdf on how to make a stock market flex & java application that needed a jsp to launch a thread on the server side ... am using the live cycle with tomcat & am getting this weird error



Now the thing is that it's working on the blazeds server when I tried, but only when I place the compiled java files & the jsp in the samples webapp inside of tomcat !!

I kinda need this urgently for my grad project which is due in 10 days :-S ... thanks in advance !!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means that the class was compiled on a later version of the JDK than it is being executed under.
 
Zyad Sherif
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I only have one version of java on my machine that I compiled the files for both blazeds & LCDS with, what can I do about this error? also I noticed that the LCDS requested the jre.home & not the Java_Home as the blazeds ... is it the reason?
 
Mac Luq
Greenhorn
Posts: 22
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Zyad.

As you've been told, you probably have to build it again with a different Java version.

For example, if you run "java -version" on your console, what can you see?

Cheers,
ML.
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The important version of java you need to compile for is the one running on the Tomcat server.
If you don't know that already, the following JSP snippet can help you get that information.



You can target newer compilers to generate code compatible with older versions of java using the -target option from the command line.
 
Zyad Sherif
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mac Luq wrote:Hi Zyad.

As you've been told, you probably have to build it again with a different Java version.

For example, if you run "java -version" on your console, what can you see?

Cheers,
ML.


it outputs the number of the latest java 1.6.0_24
it's working fine on blazeds yet can't get it run on LCDS, even when I compiled it again
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!