What package do the Files and Paths class belong to?
java.nio.file
Compile and run the following two classes using the java terminal commands:
Where does the javac command place the compiled classes by default?
In the same directory as the source code.
How can we use the javac command to compile ‘packagea/ClassA’ in the directory ‘classes’
javac -d classes packagea/ClassA.java
Compile and run the two classes below using the java terminal commands. Compile them into a directory called ‘classes’.
What options are there to specify the classpath to the java or javac command?
Create a JAR file: ‘myNewFile.jar’ based on the current directory.
jar -cvf myNewFile.jar .
– or –
jar –create –verbose –file myNewFile.jar .
Create a JAR file: ‘myNewFile.jar’ based on the directory ‘dir’
jar -cvf myNewFile.jar -C dir .