Reputation: 177
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
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