Solved

How do I detect the jdk version a user has installed?

Posted on 2004-08-18
3
525 Views
Last Modified: 2012-05-05
Hi
I have a java class that needs to have jdk2 to run how do I detect this is available and if not take user to the java download page? If there is not a workable asp way to do this perhaps I could use a combination of javascript and asp.

Thanks
0
Comment
Question by:caddworx
3 Comments
 
LVL 5

Accepted Solution

by:
cristy56 earned 500 total points
ID: 11828859
Not too sure if this could help, take it as a reference :

String strVersion = System.getProperty("java.version");
String strRequired = "1.3.1";
         
if (strVersion.compareTo(strRequired) < 0) {
   String str = "WARNING: ....blabla .. run
           with a " +strRequired+" or higher
           version Virtual Machine!!!\nYou
           should install a new Runtime
           Environement.\nLook at
           http://java.sun.com .";

      ErrorDialog d = new ErrorDlg(str);
          d.setVisible(true);
                              System.exit(1);


nil_dib

----------------------------------
Cristy
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question