From owner-freebsd-java Mon Apr 9 3:59: 6 2001 Delivered-To: freebsd-java@freebsd.org Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187]) by hub.freebsd.org (Postfix) with ESMTP id 716F737B423 for ; Mon, 9 Apr 2001 03:59:01 -0700 (PDT) (envelope-from ernst@heinz.jollem.com) Received: (from ernst@localhost) by heinz.jollem.com (8.11.3/8.11.3) id f39AvKg01972; Mon, 9 Apr 2001 12:57:20 +0200 (CEST) (envelope-from ernst) Date: Mon, 9 Apr 2001 12:57:20 +0200 From: Ernst de Haan To: "Shelton C. Johnson Jr." Cc: freebsd-java@FreeBSD.ORG Subject: Re: Patch to javavmwrapper.sh to support all sym-link executables in jdk/bin Message-ID: <20010409125720.A1959@c187104187.telekabel.chello.nl> References: <20010408120303.A70236@biturbo.digitalmagic.dnsq.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010408120303.A70236@biturbo.digitalmagic.dnsq.org>; from shelton_c_j@yahoo.com on Sun, Apr 08, 2001 at 12:03:03PM -0400 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi Shelton, Wow, from what you described this is a very nice enhancement. But if you want this patch committed, then you send a PR (the `send-pr' tool). -- Ernst Shelton C. Johnson Jr. wrote: > > the Java mailing list. > > Hi there. I was using your javavmwrapper and came up with an interesting > enhancement to it: > > > *** /usr/ports/java/javavmwrapper/src/javavmwrapper.sh Tue Jun 20 03:40:20 2000 > --- javavm Sat Apr 7 16:50:32 2001 > *************** > *** 20,31 **** > # MAINTAINER= sobomax@FreeBSD.org > > ARGS="${*}" > ! PREFIX="%%PREFIX%%" > CONF="${PREFIX}/etc/javavms" > IAM=`basename "${0}"` > > tryrunVM () { > ! if [ -x "${1}" ]; then > exec "${1}" ${2} > fi > > --- 20,34 ---- > # MAINTAINER= sobomax@FreeBSD.org > > ARGS="${*}" > ! PREFIX="/usr/local" > CONF="${PREFIX}/etc/javavms" > IAM=`basename "${0}"` > > tryrunVM () { > ! Jhome=`dirname "${1}"` > ! if [ -x "${Jhome}/${IAM}" ]; then > ! exec "${Jhome}/${IAM}" ${2} > ! elif [ -x "${1}" ]; then > exec "${1}" ${2} > fi > > > > End Patch > > You can ignore the PREFIX part of it for obvious reasons. I took one extra > step in /usr/local/bin (where javavm is installed). I used one of the > existing java installations as a template and created a set of symbolic > links to javavm which exactly mirrored the jdk/bin directory. This lets me > have command line access to all the java tools, such as javac and jar, even > the esoteric ones. This is useful for ports which ought to be built using > whatever jdk is installed, rather than depending on a specific one. > The script I used to create these links is: > > cd /usr/local/bin > for i in ../jdk1.2.2/bin/* > do > if [ -h $i ]; then > k=`basename $i` > ln -s javavm $k > fi > done > > This could be wrapped into the registerVM functionality. > > Let me know what you think, I hope you find this useful enough to enhance > the javavmwrapper port. > > Thanks for your useful script and all the other things you do with/for FreeBSD. > > > Shelton Johnson > BSD user since 386BSD 0.0 > > PS If the mail headers are wrong, my email address is shelton_c_j@yahoo.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message > -- Ernst de Haan Java Architect Jollem Information Technology "Come to me all who are weary and burdened and I will give you rest" -- Jesus Christ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message