• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting javac path in windows10  RSS feed

 
Khaled Sherif
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help and advise how to setup the java/bin path in windows 10. I am using jdk1.8_65.
 
A.J. Côté
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch!

Here is the link from java.com:
https://java.com/en/download/help/path.xml
 
Knute Snortum
Sheriff
Posts: 4091
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Here's my favorite way to do it:

* In the Windows Search bar, type "environment".
* In your environment variables (account), create a variable called JAVA_HOME. Set it to C:\Program Files\Java\jdk1.8.0_65 (or wherever your JDK is).
* In your system environment variables, edit PATH. Put this at the beginning of the PATH value: %JAVA_HOME%\bin;
* Press OK
* Exit any command windows you are in.
* Launch a command window. Type javac -version. You should get this response: javac 1.8.0_65

Next time you install a new JDK, you only have to change JAVA_HOME.
 
Khaled Sherif
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, after few trials, it only worked after I wrote the full path C:\Program Files\Java\jdk1.8.0_65\bin in the path system variable. Removed the JAVA_HOME variable, I now get the JDK 1.8.0 when I type the javac - version.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!