aspose file tools*
The moose likes Other Open Source Projects and the fly likes Using Ant run an app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Using Ant run an app" Watch "Using Ant run an app" New topic
Author

Using Ant run an app

Glenn Murray
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
I'm stumped trying to use Ant to run a project which runs from
a script as
ARGS=' -Xss500k
-Djdbc.drivers=org.gjt.mm.mysql.Driver
-Dworkbench.lib.persistent.propsFile=workbench/workbenchMySQL.properties
-cp mysql.jar:lib/jh1.1.2/javahelp/lib/jhall.jar:lib/jdom-b7/build/jdom.jar:lib/xalan-j_2_1_0/bin/xerces.jar:classes
workbench.wbgui.WorkbenchApp'
java $ARGS
My problem is that the .properties file is not being read. I tried
<target name="run">
<java classname="workbench.wbgui.WorkbenchApp" fork="yes">
<classpath path="classes:${jarfiles}"/>
<arg value="-Dworkbench.lib.persistent.propsFile=workbench/workbenchMySQL.properties"/>
<arg value="-Djdbc.drivers=org.gjt.mm.mysql.Driver"/>
<arg value="-Xss500k"/>
</java>
</target>
as well as
$ ant -Dworkbench.lib.persistent.propsFile=workbench/workbenchMySQL.properties -Djdbc.drivers=org.gjt.mm.mysql.Driver run
Any help would be appreciated.
Glenn

------------------

Glenn Murray
Author of Yo Soy Una Vaca De Hoy
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
ARGS=' -Xss500k ??
It should be something like:
-Xms500k -Xmx128M
Thanks!
Roseanne
Join our SCJD Study Group when certified

[This message has been edited by Roseanne Zhang (edited December 08, 2001).]
Glenn Murray
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
I don't think so, please see the documentation at http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html#options.
Besides, that's not the problem anyway. The problem, as I stated, is that the properties file is not being read. It makes no difference if I try to pass the stack size option or not, the problem is the -D options.
Thanks,
Glenn
------------------
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
Sorry, I never used the -Xss before.
I saw your problems now.
Change your arg to jvmarg, if everything else is ok. It will work.
Glenn Murray
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
Thanks, that did the trick.
Glenn
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Ant run an app