File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Ant run an app

 
Glenn Murray
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

------------------
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1953
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, that did the trick.
Glenn
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic