Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JVM installed check

Status
Not open for further replies.

bthale

Programmer
Oct 31, 2001
108
US
Is there a way in jav or javascript to find out if a JVM is installed? If installed, is there a way to find it's version using java or javascript?
 
Humm

If you can use Java, there's a JVM installed :)

For the version, take a look at java.lang.System.getProperty("java.version");

Dunno about Javascript, maybe you should ask that in a Javascript forum.

Cheers,

Dian
 
Maybe you guys/gals just don't get it. I can have a j2ee webapp running on a server using lots of java code and jsp's. The client machine DOES NOT have to have a JVM installed to access the web app. There are some applets that the web app uses that require a JVM to be installed, and I know the way to make the JVM automatically download and install on the client machine. I want to direct them to one of our pages to make a selection based upon OS, rather than having them go to Sun site to do this. Hope this clears up the obvious.
 
Ahh, our kind stefanwagner :)

I don't think it's an obvious question.

Anyway, the Java part of a J2EE application is executed in the serverside, so no chance of finding out about the client machine.

I still don't know it if it's possible in Javascript.

Furthermore, and from my experience, you should give user manual or disclaimer where you state that a JVM is needed and where to download it from as previous step.

Cheers,

Dian
 
These are requirements from our marketing division. I am tasked with finding out if it's possible. I am thinking of using setting a javascript variable in the applet, and setting it to true if it loads correctly. If it's false then I could open a new window or something.

stefanwagner, with you attitude, you will be "seeking a job as java-programmer in Berlin" for a long time.
 
bthale : No need to have a bad attiude here. Your quesion was "can you tell via Java or JavaScript whether a JRE is installed." Which leads us to say, yes, if you have Java installed, then use the System.getProperty() method to get the version - and if it is not, and you need to discover it via JavaScript, then perhaps you should ask in the Javascript forum.

Please keep it friendly guys, and think about your question before posing it.

--------------------------------------------------
Free Database Connection Pooling Software
 
sedj,
Maybe I should have been more explicit in my question. Also, I did pose the question in javascript forum. Since the two are related I thought it best to ask in both forums.
If you read stefanwagner replies, you will see that he implies that the questioner (me) is a stupid ass. I don't have a bad attitude, I was simply responding in kind to stefanwagner.
 
bthale:
I didn't imply that you're stupid.

From your initial question, it wasn't obvious, that this is a client/ server - question.
This may happen to everybody. Take it with some humor. :)

Now we should concentrate on the issue.
Not using javascript and applets, I will not be of much help.

seeking a job as java-programmer in Berlin:
 
After reading my earlier posts, I agree. I need to be more clearer, and I apologize for any 'catty' remarks. Thanks to all for the help.
 
No problems.
BTW, did any of those links help matters ?

--------------------------------------------------
Free Database Connection Pooling Software
 
Yes the last one you sent was good. Actually it led me to the solution. I just check to see if the applet is null, and if so, I redirect to my jsp with document.location.href.

Thanks again all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top