Created
August 19, 2012 04:21
-
-
Save fsouza/3391920 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="hello" basedir="."> | |
<property name="src" location="src"/> | |
<property name="build" location="build"/> | |
<property name="classes" location="${build}/classes"/> | |
<property name="jar" location="${build}/jar"/> | |
<target name="setup"> | |
<tstamp/> | |
<mkdir dir="${classes}"/> | |
<mkdir dir="${jar}"/> | |
</target> | |
<target name="build" depends="setup" description="compile the source"> | |
<javac srcdir="${src}" destdir="${classes}" includeantruntime="false"/> | |
</target> | |
<target name="jar" depends="build"> | |
<jar destfile="${jar}/Hello.jar" basedir="${classes}"> | |
<manifest> | |
<attribute name="Main-Class" value="br.ufes.hello.Hello"/> | |
</manifest> | |
</jar> | |
</target> | |
<target name="run" depends="jar"> | |
<java jar="${jar}/Hello.jar" fork="true"/> | |
</target> | |
<target name="clean"> | |
<delete dir="${build}"/> | |
</target> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.ufes.hello; | |
public class Hello { | |
public static void main(String[] args) { | |
System.out.println("Hello, world!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment