Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 May 2012 14:36:12 +0200
From:      Alfred Bartsch <bartsch@dssgmbh.de>
To:        "Chad Leigh Shire.Net LLC" <chad@shire.net>
Cc:        freebsd-java@FreeBSD.org
Subject:   Re: how does "javavms" work?
Message-ID:  <4FAD07BC.2090808@dssgmbh.de>
In-Reply-To: <B10943F5-3648-4993-B5C4-A0C96CFF604B@shire.net>
References:  <B10943F5-3648-4993-B5C4-A0C96CFF604B@shire.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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;
 filename="patch_javavm.txt"

LS0tIGphdmF2bS5vcmlnCTIwMTEtMDktMzAgMDQ6NDA6NTEuMDAwMDAwMDAwICswMjAwCisr
KyBqYXZhdm0JMjAxMi0wNS0xMSAwOTowNzo1My4wMDAwMDAwMDAgKzAyMDAKQEAgLTQ5Mywz
MCArNDkzLDYgQEAKIAogICAgIHVuc2V0IEpBVkFfSE9NRQogCi0gICAgIyBEZXRlcm1pbmUg
bG9jYXRpb24gb2YgYnNkLnBvcnQubWsgaWYgaXQgZXhpc3RzCi0gICAgX0pBVkFWTV9QT1JU
U0RJUj0KLSAgICBpZiBbIC1yIC91c3Ivc2hhcmUvbWsvYnNkLnBvcnQubWsgXTsgdGhlbgot
ICAgICAgICBfSkFWQVZNX1BPUlRTRElSPWAiJHtfSkFWQVZNX01BS0V9IiAtZiAvdXNyL3No
YXJlL21rL2JzZC5wb3J0Lm1rIC1WIFBPUlRTRElSIDI+L2Rldi9udWxsYAotICAgIGZpCi0K
LSAgICBfSkFWQVZNX0JTRF9QT1JUX01LPQotICAgIGlmIFsgLW4gIiR7X0pBVkFWTV9QT1JU
U0RJUn0iIC1hIC1yICIke19KQVZBVk1fUE9SVFNESVJ9L01rL2JzZC5wb3J0Lm1rIiBdOyB0
aGVuCi0gICAgICAgIF9KQVZBVk1fQlNEX1BPUlRfTUs9IiR7X0pBVkFWT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020508--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FAD07BC.2090808>