Can I make the value of
. to be a different directory from the current directory?
I'm learning Java. In the directory of my program, I have two sub-directories,
bin. Every time I have to compile my code, I enter
src to call
javac, because of the path of the Java classes imported in the source file, and I specify the destination for storing the .class files to be
../bin. When I run my code, I enter
../bin, to call
When I need to modify my code and recompile, I enter
../src again for running
javac. Then I need to enter
../bin to run my program. Constantly changing my code leads to constantly switching my current directory between
- I wonder if the organization of my program files (source and executables) is incorrect, for example, shall I put all source and executable files under the same directory, so that no need to switch?
- However that seems unwise, since it will mix source and executables in the same directory?