JH_BUILD(1)

πŸ‘‘ jh_build β€” the Javahelper girlies' build tool πŸ’…

okay so bestie, welcome to jh_build(1), part of the Javahelper family ✨. If you've ever stared at a Java source tree with no upstream build system (or one that's giving absolutely nothing useful πŸ™ˆ), this is your girl. She compiles java sources when there's no (useful) upstream build system to do it for you. periodt.


✨ SYNOPSIS ✨

jh_build [debhelper options]

jh_build [debhelper options] jarfile source [... source]

like yes, two whole moods. one with just debhelper options, one where you hand her a jarfile and some sources 🫢


🌸 DESCRIPTION 🌸

nothing here, bestie. the DESCRIPTION section is literally empty. the manpage said "no thoughts, head empty." iconic of her honestly πŸŽ€


πŸŽ€ FILES πŸŽ€

  • debian/javabuild β€” okay so this is the whole itinerary πŸ“‹. it's a file listing each build to perform. one build per line, and every line looks like this:
jarfile source [... source]

where jarfile is the name of the jar file to be built πŸ«™ and source is a source file or a directory containing source files 🌈 so each line is basically "build this jar, from these things". no cap.


πŸ’… OPTIONS πŸ’…

  • --main=main-class β€” sets the Main-Class attribute in the manifest of the jar file(s) she generates, to main-class. the result? java -jar generated-jar-file runs that class. main character energy fr fr πŸ‘‘
  • --java-home=home β€” use home as JAVA_HOME. and yes, this lowkey overrides the JAVA_HOME environment variable πŸ’– she said "my rules now".
  • -J, --javadoc, --no-javadoc β€” whether or not to build javadoc for the jar files 🧚 by default she does generate javadoc along with the jar files. so --no-javadoc is the "actually, not today" option πŸ“
  • --javacopts=options β€” passes options to javac when she's invoking javac πŸ”₯ the options value is a space-separate list of options, and bestie please remember to quote the argument so the shell doesn't go interpreting your value πŸ˜­πŸ™ˆ
  • --javadoc-opts=options β€” same deal but for javadoc, when she's invoking javadoc πŸ’œ the options value is a space-separate list of options β€” again, quote the argument so the shell stays out of it, ngl.
  • --clean β€” if you pass this, jh_build will clean up after itself 🧹✨. it's what jh_clean(1) calls, and honestly, using jh_clean(1) is recommended over calling jh_build with --clean directly. so like, yes she can do it herself, but let the dedicated girl handle it, iykyk πŸ’…

🌈 ENVIRONMENT 🌈

  • JAVA_HOME β€” if it's set (and --java-home is omitted), it determines the location of the java home for finding the javac(1) compiler, the 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 ⭐
  • CLASSPATH β€” if set, this is the classpath used during compilation of the source code πŸ¦‹
  • JH_JAR_EXTRA β€” 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 πŸ’–

πŸ“ EXAMPLE πŸ“

jh_build foo.jar src/java/main

this will generate foo.jar from compiling all the java files in src/java/main and generate a javadoc from it. slay!! πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

this program is a part of javahelper and uses debhelper as backend 🫢 there are also tutorials in /usr/share/doc/javahelper if you want the whole reading list πŸ“š


and that's the tea, bestie β˜• this was jh_build(1) from Javahelper, version 0.82, dated 2026-05-17 πŸŽ€ go compile something gorgeous. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from