• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to detect JRE version in JSP

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic