If the BankAccount.java is in
c:\user\csc224\bankproj\src\bank
and the current directory is c:\user\csc224, the command
javac bankproj/src/bank/BankAccount.java
will generate the BankAccount.class file in the same directory as BankAccount.java.
To override this default location and place the BankAccount.class in the bin directory:
c:\user\csc224\bankproj\bin\bank
use the javac option -d
javac -d bankproj/bin bankproj/src/bank/BankAccount.java
Note:
- The bankproj\bin directory must already exist; it will not be created by javac.
- On the other hand, javac will create (if necessary) the package subdirectory bank of bankproj\bin and place the BankAccount.class file in that directory.