ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Goh" <>
Subject <java> task classpath problem - please help!
Date Wed, 28 Aug 2002 11:29:53 GMT

I'm writing an installer that uses a GUI to get input from the user. These values are subsequently
pumped into an ANT script that installs the product.

I'm currently experiencing a problem with the <java> task:

The installer calls this target:

<target name="testload">
    <antcall target="start-AppServer"/>
      ... (do various stuff)

The target above calls this target (which starts the OC4J app server with the specified classpath):

<target name="start-AppServer>
  <echo message="*** Starting OC4J Application Server ***"/>
  <java fork="true" dir="${ias.root}" failonerror="true" classname="com.evermind.server.ApplicationServer">
    <arg value="-verbosity"/>
    <arg value="10"/>
      <pathelement path="${oc4j.classpath}"/>

When fired from the GUI, I guess a java.lang.NoClassDefFoundError: javax/ejb/SessionBean error
in the app server logs.  However, when I run the script manually (i.e. off command prompt:
ant -f install.xml testload) it works fine.  What could be wrong?  I've done the following

1. fork="true"
2. correct classpath
3. correct app server root (ias.root)

The GUI is a swing app that uses the ANT api to fire off the build by the way.  I was wondering,
could the classloader have anything to do with this?  If so, how can I specify a classpath
to the java task?  Any suggestions would be greatly appreciated...thanks!!!


Jason Goh

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message