Compiled bytecode of our project
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.
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`.
Build System Identification
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:
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.
Ask for a name
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:
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.
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:
Additional metadata stored in `META-INF/MANIFEST.MF` file
Adding required JAR files on JVM classpath
$ javac $(find -name '*.java')
$ find .