[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

java-config (was Re: Java policy: finding the base directory of the default JRE/JDK)



Barry Hawkins, on 2004-11-17, 09:29, you wrote:
> That's what I have been doing, I just don't know if that's how we want
> the Eclipse 3 package to work.  Is that what other Java applications
> that need JAVA_HOME are doing?  It seems a bit of a kludge, but that
> could be my inexperience with Debian packaging showing..

What about having sort of /usr/bin/java-config that returns the path to
JAVA_HOME of the currently used JDK?  So maintainers (of eclipse,
tomcat, jboss etc.) could simply add a line like

  JAVA_HOME=`/usr/bin/java-config --home`

to their scripts and be done.  Additionally there could be a tool, maybe
named update-java-config, that allows for easy switching between
installed JDKs and accounts for all update-alternatives and telling
java-config the correct location of JAVA_HOME.  java-config could be 
easily extended to support using JDKs that are currently not marked as
being the default one (and using non-free ones with additional features
like rmid etc.).  This could look like:

  JAVA_HOME=`/usr/bin/java-config --flavor=jdk1.4-sun --home`
  JAVA=`/usr/bin/java-config --flavor=jdk1.4-sun --bin=java`
  RMID=`/usr/bin/java-config --flavor=jdk1.4-sun --bin=rmid`

  $RMID &
  $JAVA my.tool.to.be.Run

Cheers,
  Joerg

-- 
Joerg "joergland" Wendland  |  http://www.wendlandnet.de/joerg/
GPG: 51CF8417 FP: 79C0 7671 AFC7 315E 657A  F318 57A3 7FBD 51CF 8417



Reply to: