jh_build - compile java sources in the absence of a (useful) upstream build system
jh_build [debhelper options]
jh_build [debhelper options] jarfile source [... source]
- A file consisting of each build to perform. One build per line where each
line consists of:
jarfile source [... source]
Where jarfile is the name of the jar file to be built and source is a source file or directory containing source files.
- Set the Main-Class attribute in the manifest of the generated jar file(s) to main-class. This makes java -jar generated-jar-file run that class.
- Use home as JAVA_HOME (overrides the JAVA_HOME environment variable).
- -J, --javadoc, --no-javadoc
- Whether or not to build javadoc for the jar files. The default is to generate javadoc along with the jar files.
- Pass options to javac (when invoking javac). The options value is a space-separate list of options (remember to quote the argument to avoid the shell interpreting the value).
- Pass options to javadoc (when invoking javadoc). The options value is a space-separate list of options (remember to quote the argument to avoid the shell interpreting the value).
- If passed, jh_build will clean up after itself. This is called by jh_clean(1) and using jh_clean(1) is recommended over calling jh_build with --clean directly.
- If set (and --java-home is omitted), it determines the location of
the java home for finding the javac(1) compiler, javadoc(1)
compiler and the jar(1) utility.
If the environment variable is unset and --java-home is omitted, then the default java home is /usr/lib/jvm/default-java
- If set, this is the classpath used during compilation of the source code.
- A space separated list of extra files or directories to include in the
generated jar file(s).
Can be omitted if no extra files need to be included.
jh_build foo.jar src/java/main
Will generate foo.jar from compiling all the java files in src/java/main and generate a javadoc from it.
This program is a part of javahelper and uses debhelper as backend. There are also tutorials in /usr/share/doc/javahelper.