From owner-freebsd-questions@FreeBSD.ORG Tue Oct 9 09:01:29 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85B116A41B for ; Tue, 9 Oct 2007 09:01:29 +0000 (UTC) (envelope-from b.movaqar@adempiere.org) Received: from kedah.mschosting.com (kedah.mschosting.com [202.75.42.90]) by mx1.freebsd.org (Postfix) with ESMTP id A50D313C44B for ; Tue, 9 Oct 2007 09:01:29 +0000 (UTC) (envelope-from b.movaqar@adempiere.org) Received: from [87.107.63.161] (port=63311 helo=attila) by kedah.mschosting.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1IfAxc-00020Q-SC; Tue, 09 Oct 2007 17:01:06 +0800 Date: Sun, 7 Oct 2007 12:36:41 +0330 From: "Bahman M." To: Stephen Allen Message-ID: <20071007123641.3278e89d@attila> In-Reply-To: <470971BC.5070505@rowyerboat.com> References: <470971BC.5070505@rowyerboat.com> X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - kedah.mschosting.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - adempiere.org X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD Questions Subject: Re: Which java binary to use? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 09:01:30 -0000 On 2007-10-08 Stephen Allen wrote: > I installed the Diablo java packages > (http://www.freebsdfoundation.org/downloads/java.shtml), but "which > java" shows "/usr/local/bin/java" which is a link to javavm in the > same directory. > > I wondered about changing the link to point to one of these: > > /usr/local/diablo-jre1.5.0/bin/java > /usr/local/diablo-jdk1.5.0/bin/java > /usr/local/diablo-jdk1.5.0/jre/bin/java > > Should I change the link, and which one of these should it point to... > the JRE? I'd suggest installing java/javavmwrapper from ports. Quoting from javavmwrapper/pkg-descr: "The Java VM wrapper provides a convenient system for switching between different Java VMs. It also provides symbolic links in ${PREFIX}/bin to allow the use of the Java executables without having to add the specific Java VM executable directories to the PATH environment variable." After installing, instead of changing symbolic links, all you need to do is to change the JAVA_HOME variable in a configuration file. Below is a snippet of my configuration using Diablo 1.5 and JDK 1.6. [snip] # JDK 1.6 (Currently commented, i.e. disabled) #JAVA_HOME=/usr/local/jdk1.6.0 #JAVA_OS=native #JAVA_VENDOR=freebsd #JAVA_VERSION=1.6 #JAVAVM_OPTS=-XX:+UseThreadPriorities # JDK 1.5 (The active JVM) JAVA_HOME=/usr/local/dialblo-jdk1.5.0 JAVA_OS=native JAVA_VENDOR=freebsd JAVA_VERSION=1.5 JAVAVM_OPTS=-XX:+UseThreadPriorities [/snip] HTH, Bahman