Mohammed NAIMI
Mohammed NAIMI

Reputation: 177

specify which jdk to use while having multiple installed

I have two JDKs installed on my laptop and I want to run a java program using the command line, my environment variables are set and I want to know how the operating system will know which JDK to use because it is not indicated in the command?

C:\mywork> javac filenamehere.java

Upvotes: 0

Views: 299

Answers (1)

user10992464
user10992464

Reputation:

Generally Windows uses the PATH environment variable to find the first executable with a matching name. If you want to specify which javac to use, try using the full path to javac.

Upvotes: 1

Related Questions