Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Saturday, April 9, 2022

How To Compile And Run Java In Different Directory In Windows?



Assuming ...

your java compiler is in the path: C:\java\jdk1.8.0_111\bin

your codes is in the path: C:\test\HelloWorld.java


To Compile:

"C:\java\jdk1.8.0_111\bin\javac" "C:\test\Hello.java"


To Run:

"C:\java\jdk1.8.0_111\bin\java" -cp "C:\test" Hello




No comments:

Post a Comment