[Anthill-pro] Anthill3 rc2

Eric Minick etm at urbancode.com
Tue Oct 24 11:46:19 CDT 2006


Curtis,

This is indeed a problem on our end. I'm not sure who you spoke with on 
our end originally, but my guess is that they were on the *nix side 
where things seem to be going properly (I'll be double checking that). 
On the Windows side of things the behavior is exactly as you described 
it. This surprised me since the scripts in use are nearly identical to 
those used by 2.x and are not dramatically modified from those that ship 
with Ant. Indeed, if you apply the script that ships with 1.6.5, the 
problem remains.

The problem is that, as you noted, JAVACMD is the first place that 
recent versions of Ant look for a Java installation rather than 
JAVA_HOME, which is what we dictate. The difference between Pro 2.x and 
3.x in this regard is that the batch script which starts up the Agent 
places a JAVACMD in the agent's environment. For us, the decision will 
be whether to further modify the Ant batch scripts or to dictate JAVACMD 
instead. For you, today, the answer is going to be to modify the batch 
script.

Here's the relevant snippet with one line changed and an echo added:

:checkJava
set _JAVACMD=%JAVACMD%

if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto runAnt

:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe

:runAnt
set ANT_CLASSPATH_ARGS=
if not "%CLASSPATH%"=="" set ANT_CLASSPATH_ARGS=-lib "%CLASSPATH%"
rem if not "%CLASSPATH%"=="" set ANT_CLASSPATH_ARGS=-cp "%CLASSPATH%"

set SYS_PROPS="-Dant.home=%ANT_HOME%"
if not "%JIKESPATH%"=="" set SYS_PROPS=%SYS_PROPS% 
"-Djikes.class.path=%JIKESPATH%"
ECHO Running using Java: %_JAVACMD%
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" 
%SYS_PROPS% org.apache.tools.ant.launch.Launcher %ANT_ARGS% 
%ANT_CLASSPATH_ARGS% %ANT_CMD_LINE_ARGS%

:end



Regards,
Eric

Curtis Yanko wrote:

>
> All,
>
> Why does AH3 insist on running Ant in the JVM that ships with AH3 and 
> not honor the JAVA_HOME variable.
>
> Looking at the 'modified' ant.bat file you guys use the _JAVACMD 
> variable to launch Ant in. I am wondering if it doesn't have something 
> to do with the javac issues I am having.
>
> On that topic, I am trying very hard to work through this on my end. I 
> have allowed our server to finish the checking out the server so it 
> officially supported and am now engaging them to help identify and 
> resolve my issue. Having said that I am dangerously close to my wits 
> end and willing to move on to the next product to evaluate so while 
> I'm sure you are comfortable that it isn't your issue it may be in 
> your best interest to remain engaged.
>
> - Curtis Yanko
> United Health Technologies
> Mail Route: CT028-07SA
> Internet email: curt_yanko at uhc.com
> Office 860.702.9059
> Cell 860.729.8171
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Anthill-pro mailing list
>Anthill-pro at lists.urbancode.com
>http://lists.urbancode.com/mailman/listinfo/anthill-pro
>  
>



More information about the Anthill-pro mailing list