Ant Users List
> Date:
> 08/23/2011 03:19 PM
> Subject:
> Re: Ant not respecting JAVA_HOME
>
>
>
> Thanks a lot for the help guys. Definitely making improvements. The
> Progra~1 shorthand works to get Ant to find the right JDK when setting the
> JAVA_HOME manually befo
Brian,
How are you opening command prompt? From start->run by typing 'command' or
by typing 'cmd'?
Thanks,
From:
Brian FitzGerald
To:
Ant Users List
Date:
08/23/2011 03:19 PM
Subject:
Re: Ant not respecting JAVA_HOME
Thanks a lot for the help guys. Definitely ma
n Mon, Aug 22, 2011 at 8:00 PM, Urena, Jose M (Jose)
>> wrote:
>> > another tip, it is not pretty.
>> > in windows when paths have spaces, you can try using windows short names
>> >
>> > if you only have 1 dir that starts with "c:\Program"
>> >
Brian FitzGerald wrote on 23/08/2011 10:41:12:
> I wrote a little .bat file (my first one, hence the ignorance),
> but it closes and opens before I can see the output to confirm there are
no
> errors. This is what it looks like:
>
> pause
> cd C:\AntTest
> set JAVA_HOME=C:\Progra~1\Java\jdk1.6
6.0_23"
> >
> >
> > the "dir /x c:\" can give you the short name for all files at c:\
> >
> > -Original Message-
> > From: Parag Doke [mailto:parag.d...@gmail.com]
> > Sent: Monday, August 22, 2011 10:26 AM
> > To: Ant Users List
&g
l files at c:\
>
> -Original Message-
> From: Parag Doke [mailto:parag.d...@gmail.com]
> Sent: Monday, August 22, 2011 10:26 AM
> To: Ant Users List
> Subject: Re: Ant not respecting JAVA_HOME
>
> The right syntax to include a value with spaces for batch files / cmd.exe is:
ot;
the "dir /x c:\" can give you the short name for all files at c:\
-Original Message-
From: Parag Doke [mailto:parag.d...@gmail.com]
Sent: Monday, August 22, 2011 10:26 AM
To: Ant Users List
Subject: Re: Ant not respecting JAVA_HOME
The right syntax to include a value with
"
-Dant.home=c:\ant org.apache.tools.ant.launch.Launcher
Thanks,
From:
Brian FitzGerald
To:
Ant Users List
Date:
08/22/2011 07:28 PM
Subject:
Re: Ant not respecting JAVA_HOME
Thanks for the help guys... this is what I got:
WITH QUOTES:
C:\Users\Brian>cd C:\AntTest
C:\AntTest>set JAVA_HOME="C:\Program
Brian FitzGerald wrote on 22/08/2011 15:42:29:
> When I wrap the variable and value with quotes as Parag suggested it
runs
> the build but still looks for Java in the jre directory.
>
What I do is have a build.bat file that contains something like the
following.
I don't have any spaces in pat
When I wrap the variable and value with quotes as Parag suggested it runs
the build but still looks for Java in the jre directory.
I commented out the echo off line as suggested and this was the output (hope
it's not too annoying that I post the whole thing):
C:\Users\Brian>cd C:\AntTest
C:\AntT
The right syntax to include a value with spaces for batch files / cmd.exe is:
set "variable=value with spaces"
So, you should have used
set "JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23"
Not sure if this might help you original issue though. Did you try to
comment the echo off line (precede with "
How about putting quotes only around the part with the space?
Alternately, is there an escape for the space? (in some form so Unix "\
" works).
On 8/22/11 9:57 AM, Brian FitzGerald wrote:
Thanks for the help guys... this is what I got:
WITH QUOTES:
C:\Users\Brian>cd C:\AntTest
C:\AntTest>set
Thanks for the help guys... this is what I got:
WITH QUOTES:
C:\Users\Brian>cd C:\AntTest
C:\AntTest>set JAVA_HOME="C:\Program Files\Java\jdk.1.6.0_23"
C:\AntTest>set ANT_HOME="C:\Ant"
C:\AntTest>%ANT_HOME%\bin\ant
The syntax of the command is incorrect.
WITHOUT QUOTES:
C:\Users\Brian>cd C:\AntTe
Santanu Basu wrote on 22/08/2011 14:07:02:
> Have you done this?
>
> C:\Users\Brian>cd C:\AntTest
> C:\AntTest>set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23
> C:\AntTest>set ANT_HOME=C:\Program Files\Apache Software
> Foundation\apache-ant-1.8.2
> C:\AntTest>%ANT_HOME%\bin\ant
>
> The above
ing?
Thanks,
Santanu
From:
Brian FitzGerald
To:
Ant Users List
Date:
08/22/2011 06:06 PM
Subject:
Re: Ant not respecting JAVA_HOME
Thank you for the response, Santanu.
> Do you have the build.xml in the directory from where you are running
ant?
> How you are calling ant?
I didn'
Thank you for the response, Santanu.
> Do you have the build.xml in the directory from where you are running ant?
> How you are calling ant?
I didn't before, but since you mentioned it I grabbed a simple hello world
build file and put that in a directory called C:\AntTest -- I am calling
Ant fro
Do you have the build.xml in the directory from where you are running ant?
How you are calling ant?
You can create a script and set the java_home just before calling
%ANT_HOME%/bin/ant.
set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23
set ANT_HOME=C:\Program Files\Apache Software Foundation\apac
17 matches
Mail list logo