Although javac handles dependency analysis well, using javac by itself misses rebuilds that a make tool does not. There are additional benefits of using clearmake or omake beyond those of using a non-ClearCase make tool, especially given the building behavior of javac.
make detects modifications of indirect dependencies that javac does not. If a.java depends on b.java and b.java depends on c.java, when you change c.java, the command javac a.java does not rebuild c.class. Therefore, if you are using javac directly, you must recompile each file as you change it.
In addition, many Java applications have some components that are compiled natively or are written in another language. For at least those parts of their applications, developers need makefile-based building.
clearmake and omake are better at determining when a rebuild is required than the Java tools, with or without make. For example, clearmake or omake detects the following rebuild cases, but javac does not:
Selection of an older version of a .java file. Because the rebuild decision is based on an older/newer comparison, javac does not detect that a rebuild is necessary.
NOTE: Clock skew between hosts can cause similar time stamp problems outside ClearCase.
Change of the javac command line. If the command-line options used to build a .class file have changed since the last build, clearmake or omake rebuilds the .class file. For example, if you add the -g switch to direct the compiler to rebuild with debugging information, you must invoke the compiler on all your .java files to ensure that they are rebuilt to contain the debugging information.
Manual winkin of a .class file that is out of sync with, but newer than, the corresponding .java source selected by the view. Because the rebuild decision is based on an older/newer comparison, javac does not detect that a rebuild is necessary.
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |