Studying oracle certification, I try to use all possible scenarios that may arise during the exam. For example, there is little doubt about the shell command line (based on unix):
Suppose there is a folder with a name myProjectand a subfolder calledmyProject/source.
The file SubFile.javais in the folder myProject/source, and the other file File.javais in the folder myProject.
By typing the following commands, I get different types of behavior:
cd source (so currently I'm in "myProject / source")
javac -sourcepath ../ File.java
// The ../ command does not work to access the Folder folder, then after compiling File.javafrom the myProjectfolder and returning to the subfolder if I try:
javac -classpath ../ SubFile.java
// with the flag -classpathit seems that it accepts the syntax ../for accessing the folder super.
Do you know why this works? and besides, is there access to the folder superwith the flag -sourcepath?
source
share