jh_compilefeatures command not found

In this troubleshooting guide we learn how to fix jh_compilefeatures command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

jh_compilefeatures: command not found

or when using sudo you get the following error message

sudo: jh_compilefeatures: command not found

Solutions to jh_compilefeatures: command not found

How To Fix jh_compilefeatures: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu jh_compilefeatures is provided by javahelper package.

javahelper is:

Javahelper contains several scripts which help in packaging Java programs.

jh_depends searches jars to find which packages they depend on, similar to dh_shlibdeps. It will also add depends on jarwrapper for packages with executable jars.

jh_classpath will register the classpath dependencies for each jar so that they can be automatically loaded when that jar is used by other programs.

jh_manifest updates the manifest in jar files according to a provided spec so that the resultant jar files will work with jarwrapper-enabled packages.

jh_exec looks for symlinks to jars which should be executable and makes them executable

jh_build builds java files to jars for you.

jh_installlibs installs library jars into the correct locations

jh_makepkg generates a template for a Debian Java package for you

jh_installeclipse installs features/plugins built by pde-build.

jh_setupenvironment prepares an out of source built for eclipse builds.

jh_generateorbitdir creates and populates an orbit dir for eclipse builds.

jh_compilefeatures compiles eclipse features based on feature ids.

/usr/share/javahelper/java-vars.mk provides a selection of useful variables such as various JVM paths and the JVM name for the architecture

/usr/share/javahelper/java-arch.sh converts Debian architecture names into java names to locate libjvm.so in non-make build systems

javahelper provides CDBS and dh macros so that it can be used with those package build systems.

Note that some of the eclipse helpers depends on packages not pulled by default (like with devscripts). You can find these scripts in Suggests.

To fix this problem, we can install more using the command below.

sudo apt-get -y install javahelper

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install javahelper.

sudo apt -y install javahelper

Or if you have aptitude installed you can use the following command.

sudo aptitude install javahelper

Summary

In this tutorial we learn how to fix jh_compilefeatures command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.