Bug#445006: maven2: Selects first JRE found, ignoring alternatives

Michael Koch konqueror at gmx.de
Wed Oct 24 08:43:30 UTC 2007


Hello,


On Sun, Oct 21, 2007 at 11:07:13PM +0100, Paul Cager wrote:
> What about if we follow this algorithm to determine  JAVA_HOME (assuming
> it is not already set)?
> 
>     (1)  Keep following the symbolic link /usr/bin/java until you get to
> a plain file.
> 
>     (2)  Traverse up the directory tree until you are in a directory
> where there is a "lib/tools.jar" file.
> 
>     (3)  If step (2) fails, then try traversing up the tree until you
> find a directory with a "bin" subdirectory.
> 
> E.g. if
> 	/usr/bin/java -> /etc/alternatives/java
> and
> 	/etc/alternatives/java -> /usr/lib/jvm/java-6-sun/jre/bin/java
> set JAVA_HOME=/usr/lib/jvm/java-6-sun

Sounds like a good plan.

Paul: Can you please look into implementing that?


Cheers,
Michael
> 
> 
> 
> _______________________________________________
> pkg-java-maintainers mailing list
> pkg-java-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers
> 





More information about the pkg-java-maintainers mailing list