package
example;
public
class
HelloWorld {
public
static
void
main(String[] args) {
System.
out
.println(
"Hello World"
);
}
}
|
<?xml version="1.0" encoding="utf-8"?>
<project
default=
"main"
basedir=
"."
>
<target
name=
"main"
depends=
"compile, compress"
description=
"Main target"
>
<echo>
Building the .jar file.
</echo>
</target>
<target
name=
"compile"
description=
"Compilation target"
>
<javac
srcdir=
"${basedir}/src/example"
/>
</target>
<target
name=
"compress"
description=
"Compression target"
>
<jar
jarfile=
"HelloWorld.jar"
basedir=
"${basedir}/src/example"
includes=
"*.class"
/>
</target>
</project>
|