ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@ebinteractive.com.au>
Subject RE: Error when compiling
Date Thu, 26 Oct 2000 04:43:01 GMT
John,

This is usually caused by having a 1.1 version javac in your classpath along
with a 1.2+ version of java.exe in your path. Ant decides that it is being
run under 1.2 and tries to invoke javac with 1.2 style options. This often
occurs when there is a java.exe in the winnt\system32 directory placed there
by a JDK1.2+ installer but JAVA_HOME is set elsewhere to a pre 1.2 JDK.

Does that make sense?

(Saved any bandwith with greyscale images lately? :-)


--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au

> -----Original Message-----
> From: JohnL@axis.com.au [mailto:JohnL@axis.com.au]
> Sent: Thursday, 26 October 2000 15:39
> To: ant-user@jakarta.apache.org
> Subject: Error when compiling
>
>
>
> Hi,
>
> I'm trying to get Ant running on WinNT.  With a pretty basic project
> template I get an error when I run ant:
>
>     [javac] Compiling 7 source files to
> D:\home\work\merrill\dev\jruntest\build
>     [javac] -sourcepath is an invalid option or argument.
>     [javac] Usage: javac <options> <source files>
>     [javac]
>     [javac] where <options> includes:
>     [javac] -g             Generate variable debugging info (default: just
> line numbers)
>     [javac] -g:nodebug     Generate no debugging info
>     [javac] -O             Optimize; may hinder debugging and make class
> files larger
>     [javac] -O:interclass  Optimize assuming class files will always be
> together
>
>     [javac] -depend        Recompile out-of-date files recursively
>     [javac] -nowarn        Generate no warnings
>     [javac] -verbose       Output messages about what the
> compiler is doing
>     [javac] -deprecation   Output source locations where
> deprecated APIs are
> used
>     [javac] -classpath <path>     Specify where to find input source and
> class files
>     [javac] -d <directory>        Specify where to place generated class
> files
>     [javac] -encoding <encoding>  Specify character encoding used
> by source
> files
>     [javac] -J<runtime flag>      Pass argument to the java interpreter
>
> When I type javac at the command prompt I get a different
> error/help message
> that indicates that -sourcepath is a valid option.
>
> This is using the "classic" compiler, and sun-jdk122 (as shipped
> with Sybase
> EAServer 3.6)
>
> I tried using Jikes, but there was some other error (IOException while
> opening a pipe with a really long set of arguments)
>
> Can anyone identify what compiler I am stumbling upon?
>
> --
> | John J. Lehmann, johnl@axis.com.au
> + To resolve a continent the size of Asia on a planet 10 light years
> + away would need a mirror 10 kilometers across.  "These will be
> + expensive but, let's face it, cheaper than actually going to the
> + stars."
>


Mime
View raw message