View Full Version : Generic Unix java.lang.OutOfMemoryError

04-20-2003, 10:59 AM
Does anybody know why I am recieveing a java.lang.OutOfMemoryError using the generic unix platform support?

The stack trace is given below:

Exception in thread "main" java.lang.OutOfMemoryError
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:105)
at java.util.jar.JarFile.<init>(JarFile.java:110)
at java.util.jar.JarFile.<init>(JarFile.java:52)
at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:491)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java, Compiled Co
at sun.misc.URLClassPath$2.run(URLClassPath.java:253)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:242)
at sun.misc.URLClassPath.getLoader(URLClassPath.java, Compiled Code)
at sun.misc.URLClassPath.getResource(URLClassPath.java:132)
at java.net.URLClassLoader$1.run(URLClassLoader.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)

This happens trying to launch the install with the generic unix native launcher.

Jeff Dillon
04-20-2003, 09:53 PM
What platform? What JVM version?

Older JVMs had small maximum heap sizes, so you may want to increase the heap size. With a Sun JVM, that is done like -Xmx60m

04-21-2003, 07:16 AM
The platform which the install is targeted for is Unixware 7.1.1. The JVM version being used is below (output from java -version)

java version "1.3.1_06"
Java(TM) 2 Runtime Environment, Standard Edition (build SCO-UNIX-J2SE-1.3.1_06:*FCS*:20021212)
Classic VM (build SCO-UNIX-J2SE-1.3.1_06:*FCS*:20021212, native threads, sunwjit)

I have tried setting the JVM initial and max heap sizes, and that does not seem to make a difference as I still get the OutOfMemoryError.

After more tests, I have tried to lauch a really simple install (ie. the java setup archive is about 15MB), this seems to works as expected.

When trying to run the actual install (ie. the java setup archive is about 220MB) this error occurs.

It seems like Java cannot load the large .jar file into memory to lauch the install. Why is this and what can I do to work around this problem?

Your help is appriciated!

04-22-2003, 10:02 AM
Any more ideas as to what may be causing this problem?