Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Can a build file be executed from a JAR?

Reply
Thread Tools

Can a build file be executed from a JAR?

 
 
hust6
Guest
Posts: n/a
 
      08-23-2005
If I have a build file sitting in a jar, is there a way to execute an
ant script from within that build file? If so, how?

Thanks, as always, for the help.

hust6

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      08-23-2005
On 23 Aug 2005 07:00:58 -0700, "hust6" <> wrote or
quoted :

>If I have a build file sitting in a jar, is there a way to execute an
>ant script from within that build file? If so, how?


There are two basic approaches.


1. Extract the script from the jar with winzip or the like and feed it
to ant normally.

2. fire up ant from Java. Your java program fishes the script out of
the jar using the java.util.zip.ZipEntry and java.util.zip.ZipFile
and feeds it to ant.

The advantage of the first is you can do it in two lines.

The advantage of the second approach is you never have to touch a
platform-specific script language.



--
Canadian Mind Products, Roedy Green.
http://mindprod.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Require when Executed file is required by another file. Zev Blut Ruby 10 02-22-2005 06:18 AM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
SQL oriented scripting language that can be executed from a C++ code Michal O C++ 0 09-21-2004 11:12 AM
Help - Can a DOS batch file be executed from HTML? oops@its.me HTML 2 01-16-2004 06:45 PM
Is there a way to allow aspnet_wp.exe to execute a DTS Package that can be executed from a Windows Form application? Dean R. Henderson ASP .Net 1 11-13-2003 05:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57