From owner-freebsd-java Sun Apr 8 9: 3:41 2001 Delivered-To: freebsd-java@freebsd.org Received: from mail5.atl.bellsouth.net (mail5.atl.bellsouth.net [207.203.120.24]) by hub.freebsd.org (Postfix) with ESMTP id 6772F37B422 for ; Sun, 8 Apr 2001 09:03:37 -0700 (PDT) (envelope-from sheltonj@bellsouth.net) Received: from biturbo.digitalmagic.dnsq.org (host-216-78-102-21.asm.bellsouth.net [216.78.102.21]) by mail5.atl.bellsouth.net (3.3.5alt/0.75.2) with ESMTP id MAA12167 for ; Sun, 8 Apr 2001 12:06:19 -0400 (EDT) Received: (from sheltonj@localhost) by biturbo.digitalmagic.dnsq.org (8.11.3/8.11.3) id f38G33F70442 for freebsd-java@freebsd.org; Sun, 8 Apr 2001 12:03:03 -0400 (EDT) (envelope-from sheltonj) Date: Sun, 8 Apr 2001 12:03:03 -0400 From: "Shelton C. Johnson Jr." To: freebsd-java@freebsd.org Subject: Patch to javavmwrapper.sh to support all sym-link executables in jdk/bin Message-ID: <20010408120303.A70236@biturbo.digitalmagic.dnsq.org> Reply-To: shelton_c_j@yahoo.com Mime-Version: 1.0 Content-Type: message/rfc822 Content-Disposition: inline User-Agent: Mutt/1.2.5i User-Agent: Mutt/1.2.5i Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org MIME-Version: 1.0 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