java not starting without explicit maximum memory flag

Jung-uk Kim jkim at FreeBSD.org
Fri Dec 13 20:24:07 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2013-12-13 15:02:56 -0500, Mikhail T. wrote:
> 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)

Please post your "sysctl hw.physmem hw.realmem hw.usermem" output.

> 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!

FYI, this version is not supported any more.

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQEcBAEBAgAGBQJSq2zmAAoJEHyflib82/FGlt0H/RAM5O19WYi+BWMINEcbk8qI
rkJvDtmXqWdomJHeGgJ/0BPi6ilFL35vzMsopjvepnf1xaxmok5Cpj1jmDOOeNwA
ZoywGeLG/7BcNFmSKkF1SNRgEFCRztRKeUbE8FG6S0Np/W0oOJIpv0zPiVOVoAlW
x0olcQPrvfLcN7rS1igC/jtxI5Q/rztj8+YpN+tasOuemHmC35alxkksIWG1N0NB
ed9SfzTjoC/Prlinr1biQsv4mJOG9N51wohULj0vNG51AvYn6QvA8inqri4bmbWF
zV8sooedL20uk5n/tpiaBOM6uha474Ynbr4YvWPK5oudSUst3+Kpn+4n8iWc29o=
=eJio
-----END PGP SIGNATURE-----


More information about the freebsd-java mailing list