From owner-freebsd-java@FreeBSD.ORG Fri Dec 13 21:28:51 2013 Return-Path: Delivered-To: java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2371E03; Fri, 13 Dec 2013 21:28:50 +0000 (UTC) Received: from mircat.net (mircat.net [81.9.105.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D06B1F4D; Fri, 13 Dec 2013 21:28:50 +0000 (UTC) Received: from [192.168.0.77] (port=49079 helo=dooku.mircat.net) by mircat.net with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77) (envelope-from ) id 1VraHw-000DSv-QX; Sat, 14 Dec 2013 01:28:48 +0400 Message-ID: <52AB7C0D.1060207@samersoff.net> Date: Sat, 14 Dec 2013 01:28:45 +0400 From: Dmitry Samersoff User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: "Mikhail T." , Jung-uk Kim Subject: Re: java not starting without explicit maximum memory flag References: <52AB67F0.4030805@aldan.algebra.com> <52AB6CE7.30605@FreeBSD.org> <52AB722F.2050403@aldan.algebra.com> <52AB7522.8040802@samersoff.net> <52AB7628.8050103@aldan.algebra.com> In-Reply-To: <52AB7628.8050103@aldan.algebra.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: dms@mircat.net Cc: java@FreeBSD.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 21:28:51 -0000 -----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 /bin/java -mx2m $* and make sure /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-----