Extracting JDK Version in a JSP

W

Wojtek

How do you get the JDK version which TomCat is using to compile a JSP
page?

I have Java code which is valid under 1.6, but which cuases an error
when Tomcat tries to compile the JSP.

Importing the JSP .java file into Ecplise shows no errors at the place
where the JSP compiler complains.

I THINK I have the JDK set to 1.6 in the Tomcat properties, but how do
I know for sure?

There should be a class/method I can use inside a JSP to echo out the
JDK version??
 
W

Wojtek

Wojtek wrote :
There should be a class/method I can use inside a JSP to echo out the JDK
version??

Yup:

System.getProperty("java.class.path");

Which shows the proper JDK version.
 
?

=?ISO-8859-15?Q?Arne_Vajh=F8j?=

Wojtek said:
Wojtek wrote :

Yup:

System.getProperty("java.class.path");

Which shows the proper JDK version.

System.getProperty("java.vm.version")

and

System.getProperty("java.version")

seems to be intended for this !

Arne
 
W

Wojtek

Arne Vajhøj wrote :
System.getProperty("java.vm.version")

and

System.getProperty("java.version")

seems to be intended for this !

Yes, except I was after the JDK. The error message was from javac.
 
?

=?ISO-8859-15?Q?Arne_Vajh=F8j?=

Wojtek said:
Arne Vajhøj wrote :

Yes, except I was after the JDK. The error message was from javac.

All 3 getProperty should return values for the JRE/JDK used
to run the servlet container.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top