Hi Robert,
Last thing by the by. If you navigate to the api and have a
look at the getProperties method of java.lang.System there's a whole
host of system variables can query using ant.
For instance to print out the current classpath
<echo message="${java.class.path}"/>
java.version Java Runtime Environment version
java.vendor Java Runtime Environment vendor
java.vendor.url Java vendor URL
java.home Java installation directory
java.vm.specification.version Java Virtual Machine specification version
java.vm.specification.vendor Java Virtual Machine specification vendor
java.vm.specification.name Java Virtual Machine specification name
java.vm.version Java Virtual Machine implementation version
java.vm.vendor Java Virtual Machine implementation vendor
java.vm.name Java Virtual Machine implementation name
java.specification.version Java Runtime Environment specification
version
java.specification.vendor Java Runtime Environment specification vendor
java.specification.name Java Runtime Environment specification name
java.class.version Java class format version number
java.class.path Java class path
java.library.path List of paths to search when loading libraries
java.io.tmpdir Default temp file path
java.compiler Name of JIT compiler to use
java.ext.dirs Path of extension directory or directories
os.name Operating system name
os.arch Operating system architecture
os.version Operating system version
file.separator File separator ("/" on UNIX)
path.separator Path separator (":" on UNIX)
line.separator Line separator ("\n" on UNIX)
user.name User's account name
user.home User's home directory
user.dir User's current working directory
Best of luck,
Mark.
-----Original Message-----
From: Robert Douglass [mailto:r.douglass@onlinehome.de]
Sent: 06 February 2002 00:24
To: Ant Users List
Subject: RE: Ant in Eclipse 2.1: Unable to find a javac compiler
Mark,
Thanks for all the info! I'll try all your suggestions. I'm really glad
these lists are here --- would've taken me ages to come up with all
those
ideas.
Robert
-----Original Message-----
From: Mark.Gargan@cs.tcd.ie [mailto:Mark.Gargan@cs.tcd.ie]
Sent: Saturday, 05 April, 2003 10:58 PM
To: r.douglass@onlinehome.de; user@ant.apache.org
Subject: RE: Ant in Eclipse 2.1: Unable to find a javac compiler
Hi Robert,
Eclipse 2.1 uses ant 1.5.2 that's located in the plugins dir no
matter what you've set in your enviroment. I'd a few hassles with it in
relation to the <war> task so I downloaded ant 1.5.3 beta and installed
the ant.jar and optional.jar over their 1.5.2 versions in the
%ECLIPSE_HOME%/plugins/org.apache.ant.1.5.2 directory (in hindsight I
maybe should have created a separate folder for 1.5.3 but wasn't sure if
Eclipse referenced it from somewhere else)
Anyway my problem went away so I was laffin'. Maybe it's a 1.5.2
problem?
Just as a matter of interest are there any spaces in your JAVA_HOME env
variable?
Here try running your ant file with the -debug option.
It provides a host of useful information the first of which is the
version of Java it detects.
Also there's the build.sysclasspath property that when set to ignore,
disregards the system classpath within the ant task. Check and see that
you don't have it in your build file somewhere.
Thanks,
Mark.
-----Original Message-----
From: Robert Douglass [mailto:r.douglass@onlinehome.de]
Sent: 06 February 2002 00:41
To: Mark.Gargan@cs.tcd.ie
Subject: RE: Ant in Eclipse 2.1: Unable to find a javac compiler
Hi Mark,
that is what has me perplexed; JAVA_HOME is absolutely correct. Could it
be
a problem of me having ANT_HOME set as an environmental variable, and
Eclipse having another Ant installation? I'll try removing ANT_HOME and
see
if that helps.
-Robert
-----Original Message-----
From: Mark.Gargan@cs.tcd.ie [mailto:Mark.Gargan@cs.tcd.ie]
Sent: Saturday, 05 April, 2003 5:19 PM
To: 'Ant Users List'; r.douglass@onlinehome.de
Subject: RE: Ant in Eclipse 2.1: Unable to find a javac compiler
Hi Rob,
I think it's got something to do with your system enviroment variables.
Check and see what JAVA_HOME is in a dos prompt i.e. type
set JAVA_HOME
and see if that's the correct path.
I think Eclipse picks this up upon installation.
I'm fairly new to Eclipse myself so this may not be your problem.
Thanks,
Mark.
-----Original Message-----
From: Robert Douglass [mailto:r.douglass@onlinehome.de]
Sent: 06 February 2002 02:35
To: user@ant.apache.org
Subject: Ant in Eclipse 2.1: Unable to find a javac compiler
Hello,
I've just upgraded my Eclipse IDE to 2.1, and with it I got ant 1.5.2.
However, I get the following error which is hard for me to understand:
[javac] BUILD FAILED:
file:F:/tdk/webapps/webs4/WEB-INF/build/build.xml:399:
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the
classpath. Perhaps JAVA_HOME does not point to the JDK
It is hard for me to understand because Eclipse has no problem compiling
my
code, and JAVA_HOME is set properly. Anybody have any suggestions?
Thanks,
Robert Douglass
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|