$ find .
$ javac $(find -name '*.java')
Adding required JAR files on JVM classpath
Additional metadata stored in `META-INF/MANIFEST.MF` file
Although the directory structure of our package is hierarchical, there is no real parent-child relationship between packages. Each package is therefore seen as independent. Above example makes use of three separate packages:
Ant build file consists mostly of targets, which are collections of steps needed to accomplish intended task. They usually depend on each other and are generally similar to Makefile targets. Available targets can be listed by invoking `ant -p` in project directory containing `build.xml` file. If the file is named differently than `build.xml` you have to tell Ant which file should be used by using `-f` option with the name of the actual build file.
Apache Ant is also configured by an XML file. It is by convention named `build.xml` and in its simple form it looks like this:
Ask for a name
At this point you should have enough knowledge about Java to start packaging. If you are not able to answer following questions return back to previous sections or ask experienced packagers for different explanations of given topics.
Build managed by Apache Maven is configured by an XML file that is by default named `pom.xml`. In its simpler form it usually looks like this:
Build System Identification
Build system used by upstream can be usually identified by looking at their configuration files, which reside in project directory structure, usually in its root or in specialized directories with names such as `build` or `make`.
Classic compiled applications use dynamic linker to find dependencies (linked libraries), Python interpreter has predefined directories where it searches for imported modules. JVM itself has no embedded knowledge of installation paths and thus no automatic way to resolve dependencies of Java projects. This means that all Java applications have to use wrapper shell scripts to setup the environment before invoking the JVM and running the application itself. Note that this is not necessary for libraries.
Compiled bytecode of our project
Compiling our project
Directory listing of example project
Environment setup consists of two main parts:
Example Java Project