Managing Dependencies Between Java Classes

See Also 

When you compile Java classes, the compiler perform a basic dependency analysis on the classes you are compiling. The compiler looks for classes that the class being compiled is dependent on, checks if they are up-to-date, and compiles any classes that are not up-to-date.

Unfortunately, the dependency checking mechanism for most compilers is not sufficient to track all of the different forms of class dependencies. This can cause the compiler to not compile out-of-date files and lead to errors when you run your application.

The IDE solves this problem by integrating JavaMakeTM, a tool that provides more extensive dependency management between Java classes. The first time you compile a project with JavaMake, the IDE examines all of the classes in a project's mounted filesystems and records the dependency information in a project database. The IDE only records dependency information for filesystems which have compilation enabled. The IDE uses this information during compilation to perform a complete check for any dependent classes that need compilation.

Note Your first compilation of a project with JavaMake takes longer than usual, since the IDE has to examine all of the classes for class dependencies.

To enable JavaMake for all Java classes:

  1. Choose Tools and choose Option from the main window.
  2. Expand the Editing node and select Java Sources.
  3. Set the Use JavaMake property to True.

When JavaMake is enabled, the Compile and Build commands behave differently than when using normal compilation. The behavior of the commands is as follows:

For more information about JavaMake, see:

http://www.experimentalstuff.com/Technologies/JavaMake/index.html
See Also
Correcting Errors in Source Code
Disabling Compilation of a Java Source File
Cross-Compiling Between Java Platforms

Legal Notices