You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ray Tayek <rt...@mediaone.net> on 2001/12/30 14:26:58 UTC

.bat file for ant

hi, using:

set JAVA_HOME=C:\jdk1.3.1_01
set ANT_HOME=D:\java\jakarta-ant-1.4
java -cp D:\java\jakarta-ant-1.4\lib\ant.jar;. org.apache.tools.ant.Main

in a batch file to run the ant sample. works fine. but the same file 
running from a different directory gets a:

D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount>java -cp 
D:\java\jkarta-ant-1.4\lib\ant.jar;. org.apache.tools.ant.Main
Buildfile: build.xml

compile:
     [javac] Modern compiler is not available - using classic compiler
     [javac] Compiling 1 source file

BUILD FAILED

D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount\build.xml:28: 
Cannot use classic compiler, as it is not available A common solution is to 
set the environment variable JAVA_HOME to your jdk directory.

anybody have a clue as to why he is confused?

thanks

---
ray tayek http://home.earthlink.net/~rtayek/
orange county java users group http://www.ocjug.org/
want privacy? http://www.freedom.net/
hate spam? http://samspade.org/ssw/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: .bat file for ant - solved!

Posted by Ray Tayek <rt...@mediaone.net>.
At 10:05 AM 12/31/01 +1100, you wrote:
>...Please read http://jakarta.apache.org/ant/manual/install.html (See note 
>in "Installing Ant" section)
>
>Under Windows 98 you will need to install Ant into a short filename. I
>suggest D:\Ant. This bypasses known limitations in Win98's "for" batch
>command.

that did the trick. all works as advertised.

thanks

---
ray tayek http://home.earthlink.net/~rtayek/
orange county java users group http://www.ocjug.org/
want privacy? http://www.freedom.net/
hate spam? http://samspade.org/ssw/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: .bat file for ant

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Ray,

Please read
http://jakarta.apache.org/ant/manual/install.html (See note in "Installing
Ant" section)

Under Windows 98 you will need to install Ant into a short filename. I
suggest D:\Ant. This bypasses known limitations in Win98's "for" batch
command.

Cheers
Conor


> -----Original Message-----
> From: Ray Tayek [mailto:rtayek@mediaone.net]
> Sent: Monday, 31 December 2001 9:57 AM
> To: Ant Users List
> Subject: Re: .bat file for ant
>
>
> At 08:54 AM 12/30/01 -0500, you wrote:
> >Why are you not simply using ant.bat that comes with the Ant
> distribution?
>
> never could make that work. if i try running that ant.bat, i get:
>
> D:\usr\ray\java\testAnt>d:\java\jakarta-ant-1.4\bin\ant.bat
> "C:\jdk1.3.1_01\bin\java" -classpath
> "C:\jdk1.3.1_01\lib\tools.jar;d:\classpath"
> -Dant.home="D:\java\jakarta-ant-1.4"     org.apache.tools.ant.Main
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/tools/ant/Main
>
>
> >Put ANT_HOME/bin in your path and simply type 'ant'.
>
> trying that (along with the homes) gets a:
>
> D:\usr\ray\java\testAnt>ant
> "C:\jdk1.3.1_01\bin\java" -classpath
> "C:\jdk1.3.1_01\lib\tools.jar;d:\classpath"
> -Dant.home="D:\java\jakarta-ant-1.4"   org.apache.tools.ant.Main
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/tools/ant/
> Main
>
> when autoexec.bat is:
>   PATH C:\jdk1.3.1_01\bin;C:\PROGRA~1\WIN98RK
> set CLASSPATH=d:\classpath
> :: ant stuff
> set ANT_HOME=D:\java\jakarta-ant-1.4
> set JAVA_HOME=C:\jdk1.3.1_01
> set PATH=%PATH%;%ANT_HOME%\bin
> SET PATH=C:\Perl\bin\;%PATH%
>
> seems like it can't work without an explicit classpath to a jar in some
> cases. but then it seems to want to have these homes defined.
> very strange.
>
> thanks
>
> >----- Original Message -----
> >From: "Ray Tayek" <rt...@mediaone.net>
> >To: <an...@jakarta.apache.org>
> >Sent: Sunday, December 30, 2001 8:26 AM
> >Subject: .bat file for ant
> >
> >
> > > hi, using:
> > >
> > > set JAVA_HOME=C:\jdk1.3.1_01
> > > set ANT_HOME=D:\java\jakarta-ant-1.4
> > > java -cp D:\java\jakarta-ant-1.4\lib\ant.jar;.
> org.apache.tools.ant.Main
> > >
> > > in a batch file to run the ant sample. works fine. but the same file
> > > running from a different directory gets a:
> > >
> > > D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount>java -cp
> > > D:\java\jkarta-ant-1.4\lib\ant.jar;. org.apache.tools.ant.Main
> > > Buildfile: build.xml
> > >
> > > compile:
> > >      [javac] Modern compiler is not available - using classic compiler
> > >      [javac] Compiling 1 source file
> > >
> > > BUILD FAILED
> > >
> > >
> D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount\build.xml:28:
> > > Cannot use classic compiler, as it is not available A common
> solution is
> >to
> > > set the environment variable JAVA_HOME to your jdk directory.
> > >
> > > anybody have a clue as to why he is confused?
> > >
> > > thanks
> > >
> > > ---
> > > ray tayek http://home.earthlink.net/~rtayek/
> > > orange county java users group http://www.ocjug.org/
> > > want privacy? http://www.freedom.net/
> > > hate spam? http://samspade.org/ssw/
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

---
ray tayek http://home.earthlink.net/~rtayek/
orange county java users group http://www.ocjug.org/
want privacy? http://www.freedom.net/
hate spam? http://samspade.org/ssw/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: .bat file for ant

Posted by Ray Tayek <rt...@mediaone.net>.
At 08:54 AM 12/30/01 -0500, you wrote:
>Why are you not simply using ant.bat that comes with the Ant distribution?

never could make that work. if i try running that ant.bat, i get:

D:\usr\ray\java\testAnt>d:\java\jakarta-ant-1.4\bin\ant.bat
"C:\jdk1.3.1_01\bin\java" -classpath 
"C:\jdk1.3.1_01\lib\tools.jar;d:\classpath" 
-Dant.home="D:\java\jakarta-ant-1.4"     org.apache.tools.ant.Main
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/tools/ant/Main


>Put ANT_HOME/bin in your path and simply type 'ant'.

trying that (along with the homes) gets a:

D:\usr\ray\java\testAnt>ant
"C:\jdk1.3.1_01\bin\java" -classpath 
"C:\jdk1.3.1_01\lib\tools.jar;d:\classpath" 
-Dant.home="D:\java\jakarta-ant-1.4"   org.apache.tools.ant.Main
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/tools/ant/
Main

when autoexec.bat is:
  PATH C:\jdk1.3.1_01\bin;C:\PROGRA~1\WIN98RK
set CLASSPATH=d:\classpath
:: ant stuff
set ANT_HOME=D:\java\jakarta-ant-1.4
set JAVA_HOME=C:\jdk1.3.1_01
set PATH=%PATH%;%ANT_HOME%\bin
SET PATH=C:\Perl\bin\;%PATH%

seems like it can't work without an explicit classpath to a jar in some 
cases. but then it seems to want to have these homes defined. very strange.

thanks

>----- Original Message -----
>From: "Ray Tayek" <rt...@mediaone.net>
>To: <an...@jakarta.apache.org>
>Sent: Sunday, December 30, 2001 8:26 AM
>Subject: .bat file for ant
>
>
> > hi, using:
> >
> > set JAVA_HOME=C:\jdk1.3.1_01
> > set ANT_HOME=D:\java\jakarta-ant-1.4
> > java -cp D:\java\jakarta-ant-1.4\lib\ant.jar;. org.apache.tools.ant.Main
> >
> > in a batch file to run the ant sample. works fine. but the same file
> > running from a different directory gets a:
> >
> > D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount>java -cp
> > D:\java\jkarta-ant-1.4\lib\ant.jar;. org.apache.tools.ant.Main
> > Buildfile: build.xml
> >
> > compile:
> >      [javac] Modern compiler is not available - using classic compiler
> >      [javac] Compiling 1 source file
> >
> > BUILD FAILED
> >
> > D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount\build.xml:28:
> > Cannot use classic compiler, as it is not available A common solution is
>to
> > set the environment variable JAVA_HOME to your jdk directory.
> >
> > anybody have a clue as to why he is confused?
> >
> > thanks
> >
> > ---
> > ray tayek http://home.earthlink.net/~rtayek/
> > orange county java users group http://www.ocjug.org/
> > want privacy? http://www.freedom.net/
> > hate spam? http://samspade.org/ssw/
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

---
ray tayek http://home.earthlink.net/~rtayek/
orange county java users group http://www.ocjug.org/
want privacy? http://www.freedom.net/
hate spam? http://samspade.org/ssw/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: .bat file for ant

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Why are you not simply using ant.bat that comes with the Ant distribution?

Put ANT_HOME/bin in your path and simply type 'ant'.

    Erik

----- Original Message -----
From: "Ray Tayek" <rt...@mediaone.net>
To: <an...@jakarta.apache.org>
Sent: Sunday, December 30, 2001 8:26 AM
Subject: .bat file for ant


> hi, using:
>
> set JAVA_HOME=C:\jdk1.3.1_01
> set ANT_HOME=D:\java\jakarta-ant-1.4
> java -cp D:\java\jakarta-ant-1.4\lib\ant.jar;. org.apache.tools.ant.Main
>
> in a batch file to run the ant sample. works fine. but the same file
> running from a different directory gets a:
>
> D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount>java -cp
> D:\java\jkarta-ant-1.4\lib\ant.jar;. org.apache.tools.ant.Main
> Buildfile: build.xml
>
> compile:
>      [javac] Modern compiler is not available - using classic compiler
>      [javac] Compiling 1 source file
>
> BUILD FAILED
>
> D:\java\java_xml_pack-fall01\jaxp-1.1.3\examples\SAXTagCount\build.xml:28:
> Cannot use classic compiler, as it is not available A common solution is
to
> set the environment variable JAVA_HOME to your jdk directory.
>
> anybody have a clue as to why he is confused?
>
> thanks
>
> ---
> ray tayek http://home.earthlink.net/~rtayek/
> orange county java users group http://www.ocjug.org/
> want privacy? http://www.freedom.net/
> hate spam? http://samspade.org/ssw/
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>