DIGIT-ARC read-only archive · snapshot: July 23, 2026

path for java.exe

5 posts · originally from https://geek.digit.in/community/threads/path-for-java-exe.154388/

digitalage
digitalage Original post #1
Mar 20, 2012 at 3:41 PM
Hi

I have multiple installations of jre on my machine, how can I check which jre is reffered when I am using "java" command.
I can check the version but I want to know exactly which java.exe is getting executed.

please let me know if there is any env variable which stores it.
masterkd
Mar 20, 2012 at 5:43 PM
iirc it'll use the latest if you use java command..to use version specific jre you need to use the version attribute!!
Faun
Faun #3
Mar 20, 2012 at 8:55 PM
path env variable
sameer.pur
Mar 21, 2012 at 11:01 AM
It will use whichever SDK/JRE's installation path is in Environment variables i.e. ClassPath.
digitalage
Mar 21, 2012 at 12:28 PM
Hay thanks all for the info.. it worked ... there was one more path set for the older jre in path env variable.. so when I added the new path in the last it didnt worked but now when i added it in the starting it worked and also i changed JAVA_HOME and JRE_HOME variable.. :thumbs: