File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Swing application don't run using apache-ANT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing application don Watch "Swing application don New topic

Swing application don't run using apache-ANT

Swaroop Kunduru
Ranch Hand

Joined: May 22, 2006
Posts: 37
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">

<pathelement path="${myclasspath}"/>

The below command works fine.

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


Swaroop Kunduru.

Swaroop Kunduru
Vladimir Loginov

Joined: Jan 26, 2011
Posts: 2
Just add param fork="true" to the <java> tag.
I agree. Here's the link:
subject: Swing application don't run using apache-ANT
It's not a secret anymore!