ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Reason" <matt.rea...@movielink.com>
Subject Multiple versions of Java on one machine - how to change $JAVA_HOME?
Date Tue, 09 Sep 2003 01:57:42 GMT
 
Hi All,
 
I have two applications I need to build.  One requires Java1.3 and the
other requires Java1.4.
 
My .profile has "export JAVA_HOME=java1.3" so if you access a the
environment from ant, then you get Java1.3.  The Java1.3 app builds fine
- no problems there.
 
My problem arises when build the Java1.4 app and I try to force ant to
use Java1.4 as the compiler.  I have to use a generic build.xml that was
previously written and it accesses the environment with one of these:
<property environment="env"/>.
 
I figured I could override the environment variables by creating a
parent build.xml that sets JAVA_HOME to Java1.4 and then calling the
generic build.xml as a child build with inheritall="true".   This is not
working, however.  The generic build still picks up the Java1.3 compiler
and then dies because it is missing a bunch of packages.
 
I'm starting to think I need to create a different user at the OS level
with Java1.4 environment variables... but I'd really prefer to have all
the building done with one user (CVS login management etc).
 
I figured this was a really simple problem but I haven't seen anything
in the documentation on and I have searched the archives.
 
Any help would be much appreciated.
 
Matt

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message