Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2013 15:02:56 -0500
From:      "Mikhail T." <mi+thun@aldan.algebra.com>
To:        java@FreeBSD.org
Subject:   java not starting without explicit maximum memory flag
Message-ID:  <52AB67F0.4030805@aldan.algebra.com>

next in thread | raw e-mail | index | archive | help
Hello!

I'm facing this problem on my 9.2/i386 box -- java (neither 1.7 nor 1.6) would
even start, unless I explicitly provide the maximum memory flag (such as -mx).
For example:

    % java -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.

with the flag -- even with very small limit -- the program starts:

    % java -mx2m -version
    openjdk version "1.7.0_25"
    OpenJDK Runtime Environment (build 1.7.0_25-b15)
    OpenJDK Server VM (build 23.21-b01, mixed mode)

It is the same with the 1.6:

    % /opt/jdk1.6.0/bin/java -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine

vs.

    % /opt/jdk1.6.0/bin/java -mx2m -version
    java version "1.6.0_03-p4"
    Java(TM) SE Runtime Environment (build 1.6.0_03-p4-mi_29_dec_2010_17_46-b00)
    Java HotSpot(TM) Server VM (build 1.6.0_03-p4-mi_29_dec_2010_17_46-b00,
    mixed mode)

It is so bad, I can't even rebuild the JDK port because of this same problem.
What's happening? Given that it affects both 1.6 and 1.7, I suspect, something
is wrong with my system, but non-java apps seem fine. What can it be? Thanks!

    -mi




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52AB67F0.4030805>