Java 1.5.0_06 Compiler Problems on Solaris
Hello.
I have some problems compiling my sources with Java Compiler javac in version 1.5.0_06 on Solaris 10. The application has to be compiled with library files from the Oracle OC4J 10.1.2 Server. When running the compilation, the following error occurs:
[javac] The system is out of resources.
[javac] Consult the following stack tracefor details.
[javac] java.lang.OutOfMemoryError
[javac]at java.util.zip.ZipFile.open(Native Method)
[javac]at java.util.zip.ZipFile.<init>(ZipFile.java:203)
[javac]at java.util.zip.ZipFile.<init>(ZipFile.java:84)
[javac]at
com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1439)
[javac]at
com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:1742)
[javac]at
com.sun.tools.javac.jvm.ClassReader.listAll(ClassReader.java:1882)
[javac]at
com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1905)
[javac]at
com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1538)
[javac]at
com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
[javac]at
com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:256)
[javac]at
com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:382)
[javac]at
com.sun.tools.javac.comp.Enter.classEnter(Enter.java:221)
[javac]at
com.sun.tools.javac.comp.Enter.classEnter(Enter.java:235)
[javac]at com.sun.tools.javac.comp.Enter.complete(Enter.java:448)
[javac]at com.sun.tools.javac.comp.Enter.main(Enter.java:433)
[javac]at
com.sun.tools.javac.main.JavaCompiler.compile (JavaCompiler.java:403)
[javac]at com.sun.tools.javac.main.Main.compile(Main.java:592)
[javac]at com.sun.tools.javac.main.Main.compile(Main.java:544)
[javac]at com.sun.tools.javac.Main.compile(Main.java:67)
[javac]at com.sun.tools.javac.Main.main(Main.java:52)
First thing i did was to extend the memory settings in the ant compilation task to:
<javac srcdir="${dir.src}"
destdir="${dir.classes}"
executable="${path.to.javacompiler}"
debug="on"
fork="true"
memoryInitialSize="512M"
memoryMaximumSize="512M"
encoding="UTF-8"
source="1.4"
target="1.4"
sourcepath="${dir.bean.src}/src/">
<classpath refid="web.classpath" />
</javac>
But this didn't work. Using the explicit library names in ant and not the entire directory (j2ee/home and j2ee/home/lib) works for 1.5.0_06! So my thought was, that the used classpath is too long or one of the library files may be damaged (because of the "java.util.zip.zipFile"-Class shown in the stacktrace). The strange thing is, when I compile the sources with an older version of javac (e.g. 1.4.x), the compilation works great.
Does anyone have similar experience with this problem?
Greetings and best regards,
Daniel

