ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Wilkinson" <>
Subject RE: WebLogic 5.1 deployment fails if the j2ee.jar isn't set in th e en vironment classpath.
Date Thu, 19 Jul 2001 15:26:56 GMT
First of all, thank you to all the people who responded to this distress

I thought I would give the results of today's hard head scratching.

The problem didn't lay in the build.xml files but the ant.bat file. Like I
said in the first email we are trying to set and build everything in the
build.xml file and hence the environment CLASSPATH is not set.

If this is the case the ant deploy line in the ant.bat becomes:
Y:\fsp\server>c:\java\jdk1.3\bin\java -classpath
ogra~1\Ant\lib\ant.jar";  -Dant.home="c:\Progra~1\Ant"
-Dweblogic.home=c:\weblogic -Dtoplink.home=c:\toplink -Dweblogic.deploy=W:\

Note the ';' at the end of the -classpath added by the automatic
construction of LOCALCLASSPATH variable. This IS the problem.

Resolution: Add this line to the 'checkJava' section of the ant.bat

to give

for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"

if "%JAVA_HOME%" == "" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat"
if exist "%JAVA_HOME%\lib\" call "%ANT_HOME%\bin\lcp.bat"

rem The automation above doesn't account for the CLASSPATH not being set. 
goto checkJikes

if "%_JAVACMD%" == "" set _JAVACMD=java
echo Warning: JAVA_HOME environment variable is not set.
echo   If build fails because sun.* classes could not be found

This makes sure that ';' not at the end of the classpath, by adding a '.'
local dir.


This message is for the named persons use only.  It may contain confidential, proprietary
or legally privileged information.  No confidentiality or privilege is waived or lost by any
mistransmission.  If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the sender.  You must
not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message
if you are not the intended recipient. PROTEK Network Management Group and each of its subsidiaries
reserve the right to monitor all e-mail communications through its networks.  Any views expressed
in this message are those of the individual sender, except where the message states otherwise
and the sender is authorised to state them to be the views of any such entity.

View raw message