Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing application don't run using apache-ANT

 
Swaroop Kunduru
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The application compiles well but when I try to run the application nothing show-up? While running externally it works fine. How to make it to run through ant? Please see below my ant script run target.


<target name="run">
<property name="myclasspath" refid="project.classpath"/>
<echo message="CLASSSPATH = ${myclasspath}" />
<java classname="com.swaroop.test.SwingDemo">

<classpath>
<pathelement path="${myclasspath}"/>
</classpath>
</java>
</target>


The below command works fine.

java -classpath C:/Users/........./SwingPro/dist/lib/MyProject-20110113.jar com.swaroop.test.SwingDemo

Regards,

Swaroop Kunduru.


 
Vladimir Loginov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just add param fork="true" to the <java> tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic