Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with building executable jar with ant.

Status
Not open for further replies.

untzkhan

Programmer
Dec 19, 2004
2
US
Hello,

I tried to make an executable jar (a jar file that contains a main method, and once a user clicks on it from WinXP, it launches)...

The following code compiles correctly, but when I click on the jar file, nothing happens... Sorry if this post was supposed to be in a different forum other than the one for ant.

code:

<target name = "deploy" depends="compile" description = "Setting up deployment package.">
<echo>Preparing deployment package...</echo>
<echo/>
<mkdir dir = "${deploy.dir}" />
<jar jarfile="${deploy.dir}/HelloWorld.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="hello.HelloWorld"/>
</manifest>
</jar>
<echo>HelloWorld jar successfully created.</echo>
</target>

Happy holidays and thanks,

Unnsse M. Khan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top