--- src/classpath.sh.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/classpath.sh 2006-09-22 22:04:49.000000000 -0700 @@ -3,9 +3,9 @@ # $FreeBSD: ports/java/javavmwrapper/src/classpath.sh,v 1.2 2004/09/03 16:23:01 glewis Exp $ # -JAVALIBDIR=%%JAVALIBDIR%% +JAVALIBDIR=/usr/share/java/classes echo -n . -find -s ${JAVALIBDIR} -name '*.jar' | while read jar ; do +find ${JAVALIBDIR} -name '*.jar' | sort | while read jar ; do echo -n ":${jar}" done --- src/javavmwrapper.sh.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/javavmwrapper.sh 2006-09-22 22:03:37.000000000 -0700 @@ -32,9 +32,9 @@ _JAVAVM_SAVE_PATH=${PATH} export PATH=/bin:/sbin:/usr/bin:/usr/sbin -_JAVAVM_PREFIX="%%PREFIX%%" -_JAVAVM_CONF="${_JAVAVM_PREFIX}/etc/javavms" -_JAVAVM_OPTS_CONF="${_JAVAVM_PREFIX}/etc/javavm_opts.conf" +_JAVAVM_PREFIX=/usr +_JAVAVM_CONF=/etc/javavms +_JAVAVM_OPTS_CONF=/etc/javavm_opts.conf _JAVAVM_PROG=`basename "${0}"` _JAVAVM_MAKE=/usr/bin/make @@ -475,30 +475,6 @@ unset JAVA_HOME - # Determine location of bsd.port.mk if it exists - _JAVAVM_PORTSDIR= - if [ -r /usr/share/mk/bsd.port.mk ]; then - _JAVAVM_PORTSDIR=`"${_JAVAVM_MAKE}" -f /usr/share/mk/bsd.port.mk -V PORTSDIR 2>/dev/null` - fi - - _JAVAVM_BSD_PORT_MK= - if [ -n "${_JAVAVM_PORTSDIR}" -a -r "${_JAVAVM_PORTSDIR}/Mk/bsd.port.mk" ]; then - _JAVAVM_BSD_PORT_MK="${_JAVAVM_PORTSDIR}/Mk/bsd.port.mk" - fi - - # If bsd.port.mk was found, use that to determine the VM to use. - if [ -n "${_JAVAVM_BSD_PORT_MK}" ]; then - JAVA_HOME=`"${_JAVAVM_MAKE}" -f "${_JAVAVM_BSD_PORT_MK}" -V JAVA_HOME USE_JAVA=yes 2>/dev/null` - if [ -n "${JAVA_HOME}" -a -f "${JAVA_HOME}/bin/${_JAVAVM_PROG}" ]; then - _JAVAVM_PROG_PATH="${JAVA_HOME}/bin" - return 0 - elif [ -n "${JAVA_HOME}" -a \ - -f "${JAVA_HOME}/jre/bin/${_JAVAVM_PROG}" ]; then - _JAVAVM_PROG_PATH="${JAVA_HOME}/jre/bin" - return 0 - fi - fi - # Then try to make sure that ${_JAVAVM_CONF} exists if [ ! -e "${_JAVAVM_CONF}" ]; then echo "${_JAVAVM_PROG}: error: can't find ${_JAVAVM_CONF} configuration file" 1>&2 @@ -580,19 +556,13 @@ if [ -n "${JAVA_VENDOR}" ]; then _JAVAVM_VENDOR= case "${_JAVAVM_VM}" in - diablo*) - _JAVAVM_VENDOR=bsdjava - ;; - j*) - _JAVAVM_VENDOR=freebsd - ;; - linux-blackdown*) + blackdown*) _JAVAVM_VENDOR=blackdown ;; - linux-ibm*) + ibm*) _JAVAVM_VENDOR=ibm ;; - linux-sun*) + j*) _JAVAVM_VENDOR=sun ;; esac --- src/checkvms.1.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/checkvms.1 2006-09-22 22:03:37.000000000 -0700 @@ -41,7 +41,7 @@ .Fx . .Sh FILES .Bl -tag -width indent -.It Pa %%PREFIX%%/etc/javavms +.It Pa /etc/javavms The location of the Java VM wrapper configuration file. .El .Sh SEE ALSO --- src/javavm.1.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/javavm.1 2006-09-22 22:03:37.000000000 -0700 @@ -37,7 +37,7 @@ The Java VM wrapper provides a convenient system for switching between different Java VMs. It also provides symbolic links in -.Pa %%LOCALBASE%%/bin +.Pa /usr/bin to allow the use of the Java executables without having to add the specific Java VM executable directories to the @@ -64,13 +64,6 @@ matching executable within the chosen Java VM. The choice of Java VM may also be influenced by using environment variables to constrain the version, vendor and operating system of the Java VM. -.Pp -This selection process is usually achieved through the use of -.Pa %%PORTSDIR%%/Mk/bsd.java.mk . -However, if this is not present then -.Nm -will use its own internal selection process which is -designed to behave almost identically. .Sh ENVIRONMENT .Bl -tag -width indent .It Ev JAVA_HOME @@ -99,8 +92,6 @@ The selected Java VM must have been released by one of the vendors in the list. .Pp Currently allowed vendors are -.Ql bsdjava , -.Ql freebsd , .Ql blackdown , .Ql ibm and @@ -129,7 +120,7 @@ Java VM as options. For more information on environment variables which can be used to set options see -.Pa %%PREFIX%%/etc/javavm_opts.conf.dist . +.Pa /etc/javavm_opts.conf.dist . .It Ev JAVAVM_DRYRUN When this variable is set, no Java VM is invoked. Instead, the Java VM wrapper prints out the following information: @@ -157,40 +148,36 @@ .El .Sh FILES .Bl -tag -width indent -.It Pa %%PREFIX%%/etc/javavms +.It Pa /etc/javavms The location of the Java VM wrapper configuration file. -.It Pa %%PREFIX%%/etc/javavm_opts.conf +.It Pa /etc/javavm_opts.conf The location of the Java VM wrapper option configuration file. -.It Pa %%PORTSDIR%%/Mk/bsd.java.mk -The file usually used, along with -.Nm make , -to select the Java VM to be used. .El .Sh EXAMPLES .Bl -tag -width indent -.It Pa %%LOCALBASE%%/bin/java +.It Pa /usr/bin/java Execute the most up to date and .Dq native Java VM registered with .Nm . -.It Ev JAVA_VERSION=1.4+ Pa %%LOCALBASE%%/bin/javac MyClass.java +.It Ev JAVA_VERSION=1.4+ Pa /usr/bin/javac MyClass.java Compile MyClass.java with a registered Java VM's javac that is at least version 1.4. -.It Ev JAVA_OS=native Pa %%LOCALBASE%%/bin/java Fl jar Pa MyApp.jar +.It Ev JAVA_OS=native Pa /usr/bin/java Fl jar Pa MyApp.jar Execute MyApp with the most up to date native Java VM that is registered with .Nm . This is necessary if MyApp uses JNI, for instance. -.It Ev JAVA_VERSION="1.2 1.4" Pa %%LOCALBASE%%/bin/java Fl jar Pa MyApp.jar +.It Ev JAVA_VERSION="1.2 1.4" Pa /usr/bin/java Fl jar Pa MyApp.jar Execute MyApp with either a Java VM that is either version 1.2 or version 1.4. -.It Ev JAVAVM_DRYRUN=yes Pa %%LOCALBASE%%/bin/java +.It Ev JAVAVM_DRYRUN=yes Pa /usr/bin/java Don't invoke the Java VM, but print out information about what would have been done. This could be used in a script to determine the .Ev JAVA_HOME that the Java VM wrapper will use, for instance: .Lp -.Ev JAVA_HOME=`env JAVAVM_DRYRUN=yes %%LOCALBASE%%/bin/java | grep '^JAVA_HOME' | cut -c11-` +.Ev JAVA_HOME=`env JAVAVM_DRYRUN=yes /usr/bin/java | grep '^JAVA_HOME' | cut -c11-` .El .Sh SEE ALSO .Xr checkvms 1 , @@ -200,20 +187,3 @@ .Xr unregistervm 1 , .Xr javavm_opts.conf 5 , .Xr javavms 5 -.Sh BUGS -The internal selection procedure of -.Nm -is not fully identical to that used when -.Pa %%PORTSDIR%%/Mk/bsd.java.mk -is present. -In particular, -.Nm -does not respect environment variables such as -.Ev JAVA_PREFERRED_PORTS -which is used by -.Pa %%PORTSDIR%%/Mk/bsd.java.mk -and will not use the values of such variables if they are set up as -.Nm make -variables in -.Pa /etc/make.conf , -for example. --- src/manvm.1.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/manvm.1 2006-09-22 22:03:37.000000000 -0700 @@ -86,8 +86,6 @@ been released by one of the vendors in the list. .Pp Currently allowed vendors are -.Ql bsdjava , -.Ql freebsd , .Ql blackdown , .Ql ibm and @@ -118,18 +116,18 @@ as options. For more information on environment variables which can be used to set options see -.Pa %%PREFIX%%/etc/javavm_opts.conf.dist . +.Pa /etc/javavm_opts.conf.dist . .El .Sh EXAMPLES .Bl -tag -width indent -.It Pa %%LOCALBASE%%/bin/manvm java +.It Pa /usr/bin/manvm java Display the on-line manual page for the .Nm java programme of the the most up to date and .Dq native Java VM registered with .Nm javavm . -.It Ev JAVA_VERSION=1.5 Pa %%LOCALBASE%%/bin/manvm javac +.It Ev JAVA_VERSION=1.5 Pa /usr/bin/manvm javac Display the on-line manual page for the .Nm javac programme for a Java VM which is version 1.5. --- src/registervm.1.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/registervm.1 2006-09-22 22:03:37.000000000 -0700 @@ -52,17 +52,17 @@ .Nm javavm . .Sh FILES .Bl -tag -width indent -.It Pa %%PREFIX%%/etc/javavms +.It Pa /etc/javavms The location of the Java VM wrapper configuration file. .El .Sh EXAMPLES .Bl -tag -width indent -.It %%PREFIX%%/bin/registervm %%LOCALBASE%%/jdk.1.4.2/bin/java -Register %%LOCALBASE%%/jdk1.4.2/bin/java as a possible choice of +.It /usr/bin/registervm /usr/jdk.1.4.2/bin/java +Register /usr/jdk1.4.2/bin/java as a possible choice of Java VM for .Nm javavm . -.It %%PREFIX%%/bin/unregistervm %%LOCALBASE%%/jdk.1.4.2/bin/java -Remove %%LOCALBASE%%/jdk1.4.2/bin/java as a possible choice of +.It /usr/bin/unregistervm /usr/jdk.1.4.2/bin/java +Remove /usr/jdk1.4.2/bin/java as a possible choice of Java VM for .Nm javavm . .El --- src/javavm_opts.conf.5.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/javavm_opts.conf.5 2006-09-22 22:03:37.000000000 -0700 @@ -66,9 +66,9 @@ .El .Sh FILES .Bl -tag -width indent -.It Pa %%PREFIX%%/etc/javavm_opts.conf +.It Pa /etc/javavm_opts.conf The location of the Java VM wrapper options configuration file. -.It Pa %%PREFIX%%/etc/javavm_opts.conf.dist +.It Pa /etc/javavm_opts.conf.dist The location of the example Java VM wrapper options configuration file distributed with the Java VM wrapper. .El @@ -76,7 +76,7 @@ .Bl -tag -width indent .It Ev JAVAVM_OPTS_diablo_jdk1_5_0=-XX:+UseMembar Run the Java VMs installed by the Diablo JDK in -.Pa %%PREFIX%%/diablo-jdk1.5.0 +.Pa /etc/diablo-jdk1.5.0 with the option .Dq -XX:+UseMembar . .It Ev JAVAVM_OPTS_javac=-deprecation --- src/javavms.5.orig 2006-09-22 22:03:31.000000000 -0700 +++ src/javavms.5 2006-09-22 22:03:37.000000000 -0700 @@ -50,7 +50,7 @@ Java VM. .Sh FILES .Bl -tag -width indent -.It Pa %%PREFIX%%/etc/javavms +.It Pa /etc/javavms The location of the Java VM wrapper configuration file. .El .Sh SEE ALSO