I had a chance to compile and execute java on the command prompt of windows, and I had a hard time, so I summarized it.
javac ...java compile command
① Use cd to move to the location of the java file you want to compile.
② Compile
//For classes without packages
javac Test.java
//For classes with packages
javac pacakage.Test.java
//If you want to compile by referring to the jar library
* When specifying the jar, use the full path
javac -classpath C¥test.jar; pacakage.Test.java
//If you want to change the output destination of the compiled class file
* Before specifying the java file,-Specify the output destination with d,
javac -classpath C¥test.jar; -d C¥local¥classes pacakage.Test.java
Recommended Posts