Specifying a Target Directory for Class Files

  1. Mount a filesystem to serve as the output for your compiler.

    Because the compiler generates classes into subfolders of the class package, you can direct the output only to the root of the filesystem and not to a folder on the filesystem. For example, if digits.java is in the package com.mycompany, the output must be contained in a directory mycompany inside a directory com, which is directly under the root of a mounted filesystem in the Explorer.

  2. From the main window, choose Tools and choose Options.
  3. In the Options window, expand Building and expand Compiler Types.
  4. Select the compiler type you want to modify.
  5. Click the value of the Target property and select the filesystem where you want to direct the compiler output.

    The next time you compile your program, the compiler generates the .class files to that filesystem. If you select <not set>, the .class files are written to their source directory.

    If you loaded a project from a previous version of the IDE, check the Output Dir Tag Replace property on the compiler type's Expert tab. The value of this property should be set to "-d " (note the trailing space).

See also
Disabling Compilation of a Java Source File
Deleting .class Files
Mounting a Filesystem

Legal Notices