Please enable JavaScript.
Coggle requires JavaScript to display documents.
[CH-1] Java | Javac | Jar terminal commands (jar (sample (jar -cvf…
[CH-1] Java | Javac | Jar terminal commands
javac
-d <dir>
directory to place generated class files
-cp <classpath> | -classpath <classpath> | --class-path <classpath>
locations of classes needed to compile program
java
-cp <classpath> | -classpath <classpath> | --class-path <classpath>
locations of classes needed to compile program
jar
-c | --create
Create New Jar File
-v | --verbose
Prints details when working with JAR files
-f | --file <file name>
JAR filename
-C <directory>
Directory containing files to be used to create the JAR
sample
jar -cvf myNewFile.jar -C dir .
jar -cvf myNewFile.jar .
jar --create --verbose --file myNewFile.jar .
-cp <classpath> | -classpath <classpath> | --class-path <classpath>