Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2007

Tip: Looking for answers? Try searching our database.

Swing Gui / Ant

Thread view: 
Emmanuel Ayanrinola - 21 Dec 2007 13:40 GMT
I have a question, how can i trigger an ant job from swing. I will
like ant to pull it values from the swing and build based on selected
value from the swing GUI. Is there any jar file that will make the
process easier? Has anyone done anything like this? The other part is
can one trigger a Macro from swing
Daniel Pitts - 21 Dec 2007 18:45 GMT
> I have a question, how can i trigger an ant job from swing. I will
> like ant to pull it values from the swing and build based on selected
> value from the swing GUI. Is there any jar file that will make the
> process easier? Has anyone done anything like this? The other part is
> can one trigger a Macro from swing

Well, basically you have to design your gui first, and then get the
values out of the swing components, and execute ANT with the values you get.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Daniel Gee - 22 Dec 2007 08:36 GMT
> I have a question, how can i trigger an ant job from swing. I will
> like ant to pull it values from the swing and build based on selected
> value from the swing GUI. Is there any jar file that will make the
> process easier? Has anyone done anything like this? The other part is
> can one trigger a Macro from swing

well based on your swing components you just run the desired command
line eg:

String desiredCommandLine = "ant "+ myGUI.figureArgsString();
Runtime.getRuntime().exec(desiredCommandLine);
Thomas Kellerer - 22 Dec 2007 09:09 GMT
Daniel Gee wrote on 22.12.2007 09:36:
>> I have a question, how can i trigger an ant job from swing. I will
>> like ant to pull it values from the swing and build based on selected
[quoted text clipped - 7 lines]
> String desiredCommandLine = "ant "+ myGUI.figureArgsString();
> Runtime.getRuntime().exec(desiredCommandLine);

No need to run an external process. Ant is just a Java program/class and can be
called directly if the libraries are on the classpath of the calling app.
Roedy Green - 23 Dec 2007 04:59 GMT
On Fri, 21 Dec 2007 05:40:54 -0800 (PST), Emmanuel Ayanrinola
<tosenr@gmail.com> wrote, quoted or indirectly quoted someone who said

>I have a question, how can i trigger an ant job from swing. I will
>like ant to pull it values from the swing and build based on selected
>value from the swing GUI. Is there any jar file that will make the
>process easier? Has anyone done anything like this? The other part is
>can one trigger a Macro from swing

you can exec ant. See http://mindprod.com/jgloss/exec.html

Ant itself is written in Java, and its API is available to Java.  It
will give you indigestion, but have a look at the ANT API Javadoc.
Surely somewhere in there is what you need.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.