ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán F. Stefánsson <>
Subject Accessing System environment variables.
Date Fri, 02 Mar 2001 22:56:34 GMT
Sorry for the repost but I'm afraid that some people might have been
scared off with the subject of the other one (was 'Running
EmbeddedTomcat through ant doesn't work').

The basic question is if there is a way to access system variables (like
JAVA_HOME) from the ant buildfile.  I need to get JAVA_HOME so I can
find where 'tools.jar' resides so I can start tomcat.


My previous post is at the end of this message.

Kind regards, 

-----Original Message-----
From: Stefán F. Stefánsson 
Sent: 2. mars 2001 10:10
To: Ant-User
Subject: Running EmbeddedTomcat through ant doesn't work.


I'm trying to run an application through ant.  This application starts
up a webserver (Tomcat) which should serve JSPs and servlets.
Everything works fine when I'm running this application through JBuilder
or from the command line but when I start it up from an ant buildfile I
have problems.

The first time I try to access a JSP page I receive an error that class cannot be found.  This happens in Tomcat when
the JAVA_HOME variable is not set (it can't find the tools.jar file).
This variable is set on my computer but when I start the app up from
within ant things don't work... the app doesn't seem to find the
JAVA_HOME variable.

So my question is:  Is there any way to either get the JAVA_HOME
variable (so I can manually find tools.jar and add it to the classpath
before I start the app through the buildfile) or can I somehow start the
app in a JVM that has access to the system variables?

Kind regards,
	Stefan Freyr

Stefan Freyr Stefansson
Software Developer
deCODE Genetics, Inc.

Phone: (+354) 570 2854
GSM:   (+354) 861 1718
Fax:   (+354) 491 3782
 <<Stefan Stefansson.vcf>> 

View raw message