Compiling a Large Number of Files With JDK 1.1

Using the javac utility provided with the Java Development Kit (JDK) 1.1.x to compile a large number of source files often fails with an OutOfMemoryError. To avoid this error, you need to increase the amount of memory available for the compiler, but there is no apparent option supported by javac that will allow you to do so.

To address the problem, you must first understand that javac uses the java interpreter, which is also supplied with the JDK. In other words, the javac compiler calls the java interpreter, and it is the interpreter that generates the OutOfMemoryError. To avoid the problem, you need to have the interpreter allocate more memory than the default amount. This can be accomplished by using the javac’s

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: