how does java determine which version to run if I have multiple versions ?

Gadsden Consulting
Gadsden Consulting used Ask the Experts™
on
I had an issue with Business Objects not working on my machine, and the likely reason is that I had 32-bit Java loaded on a 64-bit machine. At the same time I also downgraded IE-11 to IE-10 since BO doesn't support IE-11, but I don't think IE was the issue.

So in looking at what's loaded on my machine, I just wondered how Java determines what to run ?

The jre settings show that it's looking at program files, so 64-bit if you know what you're doing, but why isn't the 32-bit version displayed here?
jre settingsjava-version2.PNG
java-version.PNG
java-control-panel.png
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Full-stack Java Developer
Commented:
32 bit version might be simply unzipped to some directory and not necessarily registered in java control panel.

essentially, what java needs to run is a complete jre/jdk and a JAVA_HOME variable (also being present on PATH but not necessary)

many launcher scripts override whatever is set up in the system by setting their own JAVA_HOME and other java-related parameters, and it doesn't usually need java "installed", the runtime provided with the product is usually enough (and well-suited for the product)

now, IE by default uses system-registered java runtime, so most probably it tries to use the one you showed on the screens.

hope that helped you,
Top Expert 2016
Commented:
essentially, what java needs to run is a complete jre/jdk and a JAVA_HOME variable (also being present on PATH but not necessary)

JAVA_HOME is really only relevant to what are really 'Java Java' programs. PATH is much more important, but in the Windows world, it's very much superseded by the registry. In the 'old days', installing Java had no effect on PATH.

I'm not going to comment further as i don't know the intricacies of how it's currently meant to work on Windows, but you'd probably find out with ultimate authority if you were to run a registry monitor (you could see which keys were being queried)
Gadsden ConsultingIT Specialist

Author

Commented:
Radek and CEHI,

thank you, very helpful info.

I don't have a JAVA_HOME environment variable, but my path does have PATH=C:\ProgramData\Oracle\Java\javapath.

C:\ProgramData is new to me (and not visible in Windows Explorer), and it has as SYMLINK file, which is basically a shortcut / pointer to my 64-bit folder for Java jre.
Top Expert 2016

Commented:
One would like to think that's what IE would use. Whether it does is another matter ;)
Gadsden ConsultingIT Specialist

Author

Commented:
apologize for the delay, closing out now.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial