Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

Extracting JDK Version in a JSP

Thread view: 
Wojtek - 13 Mar 2007 22:31 GMT
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??

Signature

Wojtek :-)

Wojtek - 13 Mar 2007 23:16 GMT
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.

Signature

Wojtek :-)

Arne Vajhøj - 14 Mar 2007 00:47 GMT
> Wojtek wrote :
>> There should be a class/method I can use inside a JSP to echo out the
[quoted text clipped - 5 lines]
>
> Which shows the proper JDK version.

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

and

System.getProperty("java.version")

seems to be intended for this !

Arne
Wojtek - 14 Mar 2007 15:07 GMT
Arne Vajhøj wrote :
>> Wojtek wrote :
>>> There should be a class/method I can use inside a JSP to echo out the JDK
[quoted text clipped - 13 lines]
>
> seems to be intended for this !

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

Signature

Wojtek :-)

Arne Vajhøj - 14 Mar 2007 23:44 GMT
> Arne Vajhøj wrote :
>>> Wojtek wrote :
[quoted text clipped - 16 lines]
>
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.