PDA

View Full Version : Detecting Java runtime files


saeed
01-23-2003, 10:33 AM
Dear Friends,

one of my friend is making projects which included java functionality, he was asking me that is there any way to dectect java runtime files from windows machine. If java exists that script should return its path, but if doesn't than it should prompt that Java runtime files not found. As we know before WindowsXP, java was installed as default in the pervious operating system.

can anyone out there guide me a way how to do this or arrange me a script or OCX component.

any help would be appreciated.

Saeed. :confused:

mordred
01-23-2003, 12:18 PM
I don't know if that's what you're asking for, but you could have a look at


alert(navigator.javaEnabled());


...but I doubt you'll get at the path of the JRE by using JavaScript. Can't you detect that in Java itself instead?

saeed
01-24-2003, 09:15 AM
thanks mordred,
can you please arrange me that script from which I get the path where Java is installed. it can be in any form (OCX / COm component or any other). as u had seen while installing apache tomcat it detects is JDK is installed on that PC or not. if it is not found than it quits the installation and incase JDK in installed it prompts user and continue its installation.

thanks in advance.

Saeed.

mordred
01-24-2003, 12:31 PM
This is a JavaScript forum and neither a windows programming nor a Java forum. Your question is simply targeted at the wrong audience, I fear. In other words, I can't answer you're request because I don't know how to do it, and it's not in my domain of interest. Perhaps others here have a solution. If not, you're going to search somewhere else or write that component yourself.