---
name: "jh_installlibs"
section: "1"
platform: "linux"
package: "javahelper"
version: "0.80"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/jh_installlibs"
---

# jh\_installlibs(1)

installs jar files in usr/share/java of a package

## NAME

jh\_installlibs - installs jar files in usr/share/java of a package

## SYNOPSIS

**jh\_installlibs** \[*debhelper options*\]

**jh\_installlibs** \[*debhelper options*\] \[**-p***package*\] \[**--classpath=***cp*\] \[*jar \[...\]*\]

## DESCRIPTION

For library packages Debian Java policy currently requires that the libraries be installed to /usr/share/java in a versioned format and with an unversioned symlink. **jh\_installlibs** will take a jar and correctly install it.

As with debhelper programs, this can either take a jar as a parameter, or read a list of jars from a file in the Debian directory. It also follows the -p, -i and -a semantics of debhelper for selecting which packages to install the jar to. When operating on a package, **jh\_installlibs** will read the list of library jars from *debian/package.jlibs* or *debian/jlibs*.

The *jlibs* file is a list of jars to install, one per line, and works exactly the same as listing them on the command line. Each jar is installed to debian/*package*/usr/share/java/ in the appropriate versioned and unversioned forms.

If the jars built by upstream already contain the version number, this will be stripped before installing. **jh\_installlibs** will also try to strip the upstream version number of any ds or dfsg suffix. Other version-mangling options or explicit version numbers can also be provided.

## FILES

- *debian/package.jlibs*, *debian/jlibs*

  The *jlibs* file is a list of jars to install, one per line, and works exactly the same as listing them on the command line. Each jar is installed to debian/*package*/usr/share/java/ in the appropriate versioned and unversioned forms.

  Note that unlike most other debhelper commands, **jh\_installlibs** will use *debian/jlibs* as a fallback configuration file for *all* packages that it acts on.  Other debhelper commands usually only apply this fallback to the "main package".

## OPTIONS

- **--no-mangle**

  Do not try to sanitize the upstream version number.

- **--upstream-version=***version*

  Use *version* as the upstream version.  This option implies **--no-mangle**

- **--version-strip=***regex*

  Use *regex* instead of the built-in rules for sanitizing the upstream version number.

  This option is ignored when **--no-mangle** is passed (or implied by another option).

Beyond the above, **jh\_classpath** also accepts the shared debhelper options documented in [**debhelper**(7)](/debhelper/7.md).

## SEE ALSO

[**debhelper**(7)](/debhelper/7.md)

This program is a part of javahelper and uses debhelper as backend. There are also tutorials in /usr/share/doc/javahelper.

## AUTHOR

Niels Thykier \<niels@thykier.net\>
