Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to detect JRE version in JSP  RSS feed

 
stevan milakovic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying to detect the installed JRE version within the JSP on a client's machine.

When I go to java.com and use the tester, it shows the proper JRE installed.

I have tried to do this myself by retrieving the System properties -

java.vm.version
java.version
java.runtime.version

These all show the version of my SDK installed...not the JRE.

Any insight is appreciated. Thanks!
 
Stefan Evans
Bartender
Posts: 1834
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP runs on the server.
So the System properties are those of the server.

When the SDK is installed, it also installs a JRE (SDK is compiler + runtime)

If you are wanting the java version of the person accessing the JSP page, you can't do it in JSP. You would have to run java on their machine which would require an applet.

Make sense?
 
stevan milakovic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

This makes sense.

It looks like java.com uses an applet to perform the JRE check. I have a copy of the html source where the applet is defined and was able to get a hold of the class that backs it up.

However, I am unfamiliar with applets. With what I have retrieved, is this enough to do the experiment?

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!