java not starting without explicit maximum memory flag
Dmitry Samersoff
dms at samersoff.net
Fri Dec 13 21:28:51 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mikhail,
Java internal ergonomics incorrectly determine physmem and tries to
allocate too large heap.
Unfortunately, there is no good workaround.
Try to create a file called java like one below
#!/bin/sh
<JAVA_HOME>/bin/java -mx2m $*
and make sure <JAVA_HOME>/bin is not in your path.
- -Dmitry
On 2013-12-14 01:03, Mikhail T. wrote:
> On 13.12.2013 15:53, Jung-uk Kim wrote:
>> Hmm... Looks fine. Have you tried java/openjdk6?
> Can't build it -- neither java nor jar would start :-(
>
> On 13.12.2013 15:59, Dmitry Samersoff wrote:
>> java -XX:+PrintGCDetails -version
>>
> Well, had to insert the -mx2m into that command line, but here is
> the output:
>
> % java -mx2m -XX:+PrintGCDetails -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) Heap PSYoungGen total
> 1792K, used 295K [0x90490000, 0x90690000, 0x90690000) eden space
> 1536K, 19% used [0x90490000,0x904d9d58,0x90610000) from space 256K,
> 0% used [0x90650000,0x90650000,0x90690000) to space 256K, 0% used
> [0x90610000,0x90610000,0x90650000) ParOldGen total 1024K,
> used 0K [0x90090000, 0x90190000, 0x90490000) object space 1024K, 0%
> used [0x90090000,0x90090000,0x90190000) PSPermGen total
> 16384K, used 1436K [0x8c090000, 0x8d090000, 0x90090000) object
> space 16384K, 8% used [0x8c090000,0x8c1f73f8,0x8d090000)
>
> Thanks! Yours,
>
> -mi
>
- --
Dmitry Samersoff
Saint Petersburg, Russia, http://devnull.samersoff.net
* There will come soft rains ...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSq3wNAAoJEHEy08c4gIABLM8H/ixN5UCy6SsIVT5aYUlENgzF
uCkGyzPTeHu7h4iW+LiqPlNltnsc1/hBc4121sjJDl9oe9Y1CiTC3sbdX+rrFPhz
p4np0aIwViF2VMyxCgmiyG/mM0HfV/ZrrOsslCBNF+yOzdV6rFEChOuZHyj6uffG
Gan8YuHKVWeCXGxjyfd0VsXBN6rYDNCyAijLATHuyvrLGXxQyMkvId1jOJaRmtBv
WTQkxUtbjZ40XMsKc01/LwQyLEtxjXbXq1O8LkeQHUwREmq+V3ZB62B1YJsKT2ln
moW5QBUr7PijbgMMMQczRJl51vhv4IZwGfBDPImi1Xwsjc6/83VmS8DQneAxLvw=
=X3qZ
-----END PGP SIGNATURE-----
More information about the freebsd-java
mailing list