Re: how does windows find java.exe?

On Tue, 26 Jun 2007 07:09:41 -0700, Martin
<EdkIlhKpnBbr@xxxxxxxxxxxxx> wrote, quoted or indirectly quoted
someone who said :

How does windows find java.exe if I type "java" in the command line
and if java.exe is not in the path?

I know that there is a registry key HKEY_LOCAL_MACHINE\SOFTWARE
\JavaSoft\Java Runtime Environment but I guess windows does not know
about it.

There is a way of putting any file no matter where it is, on the path
by creating a registry entry. See

However, that is not how Sun did it.

Further, they did not add the JRE path to the execution path.

Here is the trick. They place a spare copy of java.exe in

which IS on the path. It starts up, looks in the registry to figure
out the official java.exe. then starts that.

Roedy Green Canadian Mind Products
The Java Glossary