.\" $NetBSD: java-wrapper.1,v 1.1.1.1 2004/06/04 16:35:07 jmmv Exp $ .\" .\" java-wrapper - Runs different Java implementations transparently. .\" Copyright (c) 2004 Julio M. Merino Vidal .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Neither the name of The NetBSD Foundation nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" 3. Neither the name of author nor the names of its contributors may .\" be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd June 4, 2004 .Dt JAVA-WRAPPER 1 .Os .Sh NAME .Nm java-wrapper .Nd runs different Java implementations transparently .Sh SYNOPSIS .Nm appletviewer .Op Ar arg1 .. argN .Nm jar .Op Ar arg1 .. argN .Nm java .Op Ar arg1 .. argN .Nm javac .Op Ar arg1 .. argN .Nm javadoc .Op Ar arg1 .. argN .Nm javah .Op Ar arg1 .. argN .Nm javap .Op Ar arg1 .. argN .Sh DESCRIPTION .Nm is a small wrapper that overrides the most common Java programs. It executes the right Java implementation based on user's preference. .Pp A configuration file is used to specify which Java implementation is chosen. The wrapper first tries to read .Pa ~/.java-wrapper.conf , falling back to .Pa @PKG_SYSCONFDIR@/java-wrapper.conf if not found (note that one of them must exist; otherwise it will simply abort execution). .Pp The configuration file simply defines some variables that map Java programs to Java implementations. Each variable contains the name of an implementation, installed from pkgsrc, like .Sq sun14 or .Sq kaffe . Variables doing this mapping have the same name as the Java program, but in uppercase letters: .Va APPLETVIEWER , .Va JAR , .Va JAVA , .Va JAVAC , .Va JAVADOC , .Va JAVAH , and .Va JAVAP . Even though, there is an special variable called .Va DEFAULT . This one sets the name of the implementation used in case any of the specific variables are unset or empty. .Pp The real binary is then searched in .Pa @PREFIX@/bin/, using the name given in the variable, followed by a dash, followed by the Java program. For example, if you set .Sq JAVA=sun14 , whenever you run .Nm java , you will be really executing .Pa @PREFIX@/bin/sun14-java . .Sh FILES .Bl -tag -width @PKG_SYSCONFDIR@/java-wrapper.conf -compact .It Pa @PREFIX@/bin/ Location of real Java binaries. .It Pa @PKG_SYSCONFDIR@/java-wrapper.conf System wide configuration file. .It Pa ~/.java-wrapper.conf User specific configuration file. .El .Sh AUTHORS .An Julio M. Merino Vidal Aq jmmv@NetBSD.org