From owner-freebsd-java@FreeBSD.ORG Fri May 11 12:36:22 2012 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60D2F1065673 for ; Fri, 11 May 2012 12:36:22 +0000 (UTC) (envelope-from bartsch@dssgmbh.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) by mx1.freebsd.org (Postfix) with ESMTP id 0635D8FC15 for ; Fri, 11 May 2012 12:36:22 +0000 (UTC) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id 4A9E45CA65; Fri, 11 May 2012 14:36:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id 7i2YluuTI3iN; Fri, 11 May 2012 14:36:13 +0200 (CEST) Received: from mail.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id D29685CA5F; Fri, 11 May 2012 14:36:13 +0200 (CEST) Received: from pcadmin.incore (pcadmin.incore [192.168.0.140]) by mail.incore (Postfix) with ESMTPSA id CA9E945087; Fri, 11 May 2012 14:36:13 +0200 (CEST) Message-ID: <4FAD07BC.2090808@dssgmbh.de> Date: Fri, 11 May 2012 14:36:12 +0200 From: Alfred Bartsch User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:7.0.1) Gecko/20111007 Thunderbird/7.0.1 MIME-Version: 1.0 To: "Chad Leigh Shire.Net LLC" References: In-Reply-To: X-Enigmail-Version: undefined Content-Type: multipart/mixed; boundary="------------000705090603050708020508" Cc: freebsd-java@FreeBSD.org Subject: Re: how does "javavms" work? X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 12:36:22 -0000 This is a multi-part message in MIME format. --------------000705090603050708020508 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 27.04.2012 20:53, schrieb Chad Leigh Shire.Net LLC: > Hi > > Not the behind the scenes really. Just how do I use it? > > I installed OpenJDK7 from ports. As part of that it installed the > Diablo stuff (Java 6). > > the /usr/local/etc/javavms file listed both. But when I edited > this file to only have the OKDK 7 version, it still runs the Diable > JDK 6 stuff when I type "java" at the command line. > > I read the man file on javavms and used registervm and unregistervm > and javavms only lists the OpenJDK 7 version but if I do > > # java -version java version "1.6.0_07" Diablo Java(TM) SE Runtime > Environment (build 1.6.0_07-b02) Diablo Java HotSpot(TM) 64-Bit > Server VM (build 10.0-b23, mixed mode) # > Normally, the Diablo stuff is installed as a build dependency to compile the openjdk stuff, and can safely be removed afterwards. But you may keep both JVMS, or you may install even some more. In these cases javavmwrapper kicks in and lets you choose your preferred JVM. Unfortunately, javavmwrapper behaves differently, whether it sees an installed portstree (/usr/ports/Mk/bsd.java.mk) or not. It is my experience that the wanted priority of JVMs due to /usr/local/etc/javavms is only guaranteed, if there is no portstree available. So I decided to patch the javavm wrapper skript (/usr/local/bin/javavm) to remove these unwanted features. Now everything works for me as expected. The attached patch file applies to an installed javavmwrapper-2.3.5 port. You may alternatively just remove those lines from the script file. HTH P.S.: I'm thinking of filing a PR, since it looks like a bug. - -- Alfred Bartsch Data-Service GmbH mailto:bartsch@dssgmbh.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+tB7wACgkQ5QGe2JdVf3g4MwCeO+POVkgOVEYs6yrD4DedfwD3 XacAoLpEI04nrdZq3/iQVFK3QUry/doy =sOgr -----END PGP SIGNATURE----- --------------000705090603050708020508 Content-Type: text/plain; name="patch_javavm.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment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IGlmIFsgLW4gIiR7SkFW QV9IT01FfSIgLWEgLWYgIiR7SkFWQV9IT01FfS9iaW4vJHtfSkFWQVZNX1BST0d9IiBdOyB0 aGVuCi0gICAgICAgICAgICBfSkFWQVZNX1BST0dfUEFUSD0iJHtKQVZBX0hPTUV9L2JpbiIK LSAgICAgICAgICAgIHJldHVybiAwCi0gICAgICAgIGVsaWYgWyAtbiAiJHtKQVZBX0hPTUV9 IiAtYSBcCi0gICAgICAgICAgICAgICAtZiAiJHtKQVZBX0hPTUV9L2pyZS9iaW4vJHtfSkFW QVZNX1BST0d9IiBdOyB0aGVuCi0gICAgICAgICAgICBfSkFWQVZNX1BST0dfUEFUSD0iJHtK QVZBX0hPTUV9L2pyZS9iaW4iCi0gICAgICAgICAgICByZXR1cm4gMAotICAgICAgICBmaQot ICAgIGZpCi0KICAgICAjIFRoZW4gdHJ5IHRvIG1ha2Ugc3VyZSB0aGF0ICR7X0pBVkFWTV9D T05GfSBleGlzdHMKICAgICBpZiBbICEgLWUgIiR7X0pBVkFWTV9DT05GfSIgXTsgdGhlbgog ICAgICAgICBlY2hvICIke19KQVZBVk1fUFJPR306IGVycm9yOiBjYW4ndCBmaW5kICR7X0pB VkFWTV9DT05GfSBjb25maWd1cmF0aW9uIGZpbGUiIDE+JjIK --------------000705090603050708020508--