ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: java_home warning
Date Fri, 25 May 2001 01:57:03 GMT

Hi Hari,

I get sick of setting environment variables at the user level on windows
machines, so my approach to Ant has been to create a batchfile in the
directory with the appropriate build.xml file.  This batchfile sets all of
the environment variables and then calls "cmd".

I find this more managable than doing it with system settings, which are
often mangled by installations of other programs, or contain junk from other
installations of software, etc...

The effect is that, to use ant, you double-click on the file from an
explorer window and then type "ant etc..." commands into the resulting
command window (dos-prompt).  Following is a sample batch file I am using:

--- antcmd.bat script begins ---
  @echo off

  REM Set ANT_HOME to the location of your ANT install
  set ANT_HOME=d:\apps\java\ant
  REM Set JAVA_HOME to the location of your Java install
  set JAVA_HOME=d:\apps\java\jre

  REM Set Jikes to the location of your jikes install
  set JIKES=d:\apps\util\jikes

  REM You will probably not need to alter the PATH
  set PATH=c:\WINNT\SYSTEM32;%JAVA_HOME%\bin;%ANT_HOME%\bin;%JIKES%\bin

  if %1. == . goto interactive
  ant %1
  goto done


--- antcmd.bat script ends ---

| John J. Lehmann,
+ There's not much to do out here in the Midwest. The rowdier young folk
+ like to go into the meadows and tip cows at midnight. 

> -----Original Message-----
> From: Ramasubbu, Hari []
> Sent: Friday, May 25, 2001 7:01 AM
> I have a question .I have set the java_home env variable in 
> my win 2000
> machine .but still i get this error on my command line .

View raw message