JPACKAGE_SCRIPT(7)
π JPACKAGE_SCRIPT(7) π
Okay so this is the JPACKAGE_SCRIPT(7) page from the Miscellaneous Information Manual, and it's giving βhow do I make a shell launcher for a Java app inside an RPM build?β energy. Bestie, it's a macro page, but we're gonna make it make sense. π
β¨ NAME β¨
jpackage_script β generate a shell launcher script for a Java application in an RPM build
πΈ SYNOPSIS πΈ
%jpackage_script [-h] [-c config_file] main_class flags options jars script_name
π¦ DESCRIPTION π¦
The jpackage_script RPM macro creates a shell launcher script that prepares the runtime environment and then invokes a Java application. It is typically invoked during the %install phase of an RPM build. The script is written to %{buildroot}%{_bindir}/script_name.
The generated script uses helper functions from %{javadir}-utils/java-functions to construct the classpath, process flags and options, and execute the JVM. It also reads optional configuration files to allow system-wide and per-user customization. No cap, that's the whole vibe.
If the RPM macro %{java_home} is defined at build time, the generated script hardcodes its value as the default JAVA_HOME. If %{java_home} is not defined, the generated script locates the java executable using the user's PATH. Users can override the selected Java runtime by setting JAVA_HOME in their environment.
When the -h option is specified, the macro does not embed any default JAVA_HOME setting in the generated script, leaving runtime selection entirely to the user environment. That's it, that's the behavior. π
π OPTIONS π
-hβ Do not set a default value forJAVA_HOMEin the generated script. The script will rely on the user's environment or lookup viaPATH.-cconfig_file β Specify the name of the configuration file sourced by the generated script instead of the default%{_sysconfdir}/java/%{name}.conf.
π§ ARGUMENTS π§
main_classβ Fully qualified name of the Java main class to execute.flagsβ Whitespace-separated JVM flags to apply by default.optionsβ Whitespace-separated application options to apply by default.jarsβ A colon-separated list of JAR names. Each element is processed withbuild-classpathto produce the runtime classpath.script_nameβ Name of the launcher script to create in%{_bindir}.
π FILES π
%{javadir}-utils/java-functionsβ Helper functions used by the generated launcher script.%{_sysconfdir}/java/%{name}.confβ Default system-wide configuration sourced by the generated script.$HOME/.%{name}rcβ Optional per-user configuration sourced by the generated script.
π EXAMPLES π
Generate the msv launcher with the main class msv.textui.Driver and a classpath assembled from multiple libraries:
%jpackage_script msv.textui.Driver "" ""
msv-msv:msv-xsdlib:relaxngDatatype:isorelax msv
π SEE ALSO π
π AUTHORS π
Mikolaj Izdebski <mizdebsk@redhat.com>
π That's the whole page, bestie β brought to you by Debian, dated February 18, 2026, and filed under JPACKAGE_SCRIPT(7). Periodt. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: javapackages-tools 6.5.1-160000.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: javapackages-tools 6.5.1-160000.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: javapackages-tools 6.5.1-160000.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: javapackages-tools 6.5.1-160000.2.1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms