I have multiple JDKs configured in my system i.e. JDK 8, 9 & 10 (early access). I need to execute the Jdeps tool available in JDK 9, however on issuing the jdeps -version
command the one available in JDK 8 is getting executed.
I have the PATH
and JAVA_HOME
environment variables set properly to JDK 9 path. When I issue java -version
command it shows me the JDK 9 version, but surprisingly jdeps isn't behaving in that manner.
Can someone pls tell me how do I execute jdeps
available in JDK 9?
Failed attempts so far:
PATH
&JAVA_HOME
set to JDK 9- Executed the command from
< JDK9 >/bin
directory
Completely removing JDK 8 for now, is not an option for me right now
pwd
: I'm currently in JDK 9's bin directoryJAVA_HOME
: Points to JDK 9PATH
: I've intentionally skipped the JDK/bin directory here to prove the point that path doesn't point to any other JDK versionjava -version
: Hence proved that there's other java version being referred by PATH- Added
jdk(9)/bin
toPATH
java -version
: We can see that JDK 9 is being used. Also the latest value added to PATH is finejdeps -version
: Here comes the trouble! It's JDK 8 used by jdeps