Java

A Java engine, also known as JVM, Java virtual machine, is needed for most uses of Klipspringer. The only exception would be playing only internet streams or directly from hardware devices. It’s simplest to install Klipspringer with a full JDK, Java development kit, although you can get by with just a JVM with a workaround explained below.

Test if you have a proper JDK installed with the following terminal command:

javac -version

If this outputs 17 or higher you are fine. It shouldn’t matter if it’s Open JDK or Oracle’s Java engine. You can use the linked websites for suggestions on how to install on your system, or the following instructions if you’re using Linux or macOS.

Debian-based Linux (including Raspberry Pi OS and Ubuntu)

The current default JDK may be too old, but installing a newer one is simple:

sudo apt install openjdk-17-jdk

You can choose a newer version than 17 if one is available of course. Check for it with apt-cache search openjdk.

Mac

There are several easy ways of installing Open JDK on macOS. For instance, if you use Homebrew:

brew install openjdk

For other options, see the Open JDK website.

JAVA_HOME

To build the dynamic library that Klipspringer needs in order to invoke libFLAC, the compiler and linker needs header files associated with the Java native interface. If you have a JDK (Java development kit), those files are under JAVA_HOME/include/, where JAVA_HOME is a path that depends on your JDK installation. The Klipspringer configure script makes several attempts to find the correct JAVA_HOME path on your system. If it fails, you need to specify the path as an environment variable before invoking configure. In Bash, Zsh, and most other Unix shells, you can do something like this before running ./configure:

export JAVA_HOME=/path/to/my/java_home

Building without JDK

If you don’t have a JDK installation, and don’t need it for any other purpose, a minimal workaround is to find a JDK source repository on the internet, and just fish out the two header files JAVA_HOME/include/jni.h and JAVA_HOME/include/OS/jni_md.h, where OS corresponds to your operating system (linux for any Linux variant, darwin for macOS, etc.), place them in your file system, and point to their location by setting the JAVA_HOME environment variable as explained above.

Specifying the java command

By default, the configure script assumes that the Java executable to use is the one referenced by the java command in the current environment. To override it (which can let you build Klipspringer without Java present), set the environment variable JAVA to your preferred command. In Bash and most other Unix shells, you can do something like this before running ./configure:

export JAVA=/usr/lib/jvm/java-11-openjdk-amd64/bin/java