From owner-freebsd-ports-bugs@FreeBSD.ORG Fri May 18 05:29:47 2012 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD8B11065670 for ; Fri, 18 May 2012 05:29:47 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id 5C8EA8FC0A for ; Fri, 18 May 2012 05:29:47 +0000 (UTC) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.14.5/8.14.5) with ESMTP id q4I5Tckv047603 for ; Thu, 17 May 2012 22:29:39 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.14.5/8.14.5/Submit) id q4I5TcuW047602 for freebsd-ports-bugs@freebsd.org; Thu, 17 May 2012 22:29:38 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Thu, 17 May 2012 22:29:38 -0700 From: Greg Lewis To: freebsd-ports-bugs@freebsd.org Message-ID: <20120518052938.GA47480@misty.eyesbeyond.com> References: <201205112009.q4BK9kvG098150@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205112009.q4BK9kvG098150@freefall.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: ports/167799: javavmwrapper-2.3.5 does not always choose the right java vm X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2012 05:29:47 -0000 I think this PR misunderstands what javavm is designed to do and how to configure it. One of the main design requirements for javavm was to provide a mechanism for ports maintainers to be able to get the same JDK at runtime that they specified when they were building their ports. Specifically, they can specify requirements such as version (JAVA_VERSION), vendor (JAVA_VENDOR), etc., in the shell scripts that launch Java applications and get the same JDK chosen at run time as was chosen at build time. The main way this is done is by using the same logic, i.e. by running those requirements through bsd.java.mk and using the JDK that it chooses. Only if the ports tree is not found does javavm then try and fall back to using some internal logic to try and pick the same JDK. In that sense, this patch removes the primary piece of functionality from javavm by making it not use bsd.java.mk if it's available. This leaves only the fallback logic, which can easily get out of sync with how the ports infrastructure chooses JDKs at build time. In terms of selecting the JDK, neither javavms, nor javavm_opts.conf is involved in that. In particular, javavms is an internally used file that should just list all the JDKs available. It is not designed to be edited by a user. javavm_opts.conf is just for passing options to particular JDK instances, it has no bearing on what JDK is chosen. The way to influence what JDK you want javavm to choose is to set environment variables like JAVA_VERSION, etc. If it is inconvenient to set environment variables, then I would consider introducing a configuration file that contained those variable settings that could be sourced by javavm at runtime. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org