change to runtime jre properties

Larry O'Leary loleary at redhat.com
Mon Oct 14 18:18:01 UTC 2013


Thanks Jay. 

On Mon, 2013-10-14 at 14:00 -0400, Jay Shaughnessy wrote:
> The work here had two purposes. First, actually honor the properties set 
> by users.  Previously, despite setting things like RHQ_SERVER_JAVA_HOME, 
> we'd still end up using JAVA_HOME or PATH when doing various things, 
> even failing if Java could not be found in those fallback locations.  
> Second, to simplify things we consolidated properties into just 
> RHQ_JAVA_EXE_FILE_PATH and RHQ_JAVA_HOME.  The former taking precedent 
> and allowing direct specification of the Java exe, and the second the 
> more traditional Java home type specification.   Nothing has actually 
> changed other than us honoring the definitions of the properties we 
> already advertised (well, and now the updated properties).
> 
> If you don't specify the RHQ_JAVA_XXX properties, and also don't 
> explicitly specify JAVA_HOME, then we do what we've done in the past and 
> we try to set JAVA_HOME automatically given typical locations Java may 
> be found for the particular OS.  If found, we then use that Java.  If 
> not found we exit, asking the user to set something that will allow us 
> to find the JRE.
> 
> As for our discovery of JAVA_HOME, that logic has not changed in a 
> while, and may have issues of its own, see [1], but for the purposes of 
> this discussion I think the bottom line is that this work falls under 
> bug fix, not behavioral change.
> 
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=788704
> 
> p.s. If you have comments regarding the JAVA_HOME discovery please let 
> them be known in the BZ.
> 
> On 10/14/2013 12:14 PM, Larry O'Leary wrote:
> > What is the rationale behind this change? This seems like a very bad
> > idea considering that in a server environment JAVA_HOME, RHQ_JAVA_HOME,
> > etc are not what control the server's JVM but rather what is specified
> > by `alternatives`. In which case, `java` is resolved from $PATH.
> >
> > Environment variables and system properties are only intended as a means
> > to override the default. By requiring use of overrides, it makes RHQ
> > less portable and harder to provision/use.
> 
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel



More information about the rhq-devel mailing list