From openjdk-distro-pkg-dev Wed May 11 05:52:19 2016 From: Eric Hameleers Date: Wed, 11 May 2016 05:52:19 +0000 To: openjdk-distro-pkg-dev Subject: Re: configure: error: "A rhino jar was not found in /usr/share/java as either rhino.jar or js.jar." Message-Id: X-MARC-Message: https://marc.info/?l=openjdk-distro-pkg-dev&m=146294607329475 On Wed, 11 May 2016, YuGiOhJCJ Mailing-List wrote: > In your package file list [1] I can see that the "java" and "javac" binaries are available in the "/usr/lib/java/bin" directory instead of "/usr/bin". > Does that mean that each user of the system needs to add the "/usr/lib/java/bin" directory to his "PATH" environment variable in order to use easily these binaries? > Is there a reason for this location for the binaries? > > [1] http://www.slackware.com/~alien/slackbuilds/openjdk7/pkg/14.1/openjdk7-7u101_b00-i486-1alien.lst A file list does not tell you everything. You forgot to check two things: (1) A Slackware package also contains a "doinst.sh" script and that is where the symbolic links are created when installing the package. Some packages may create symbolic links in /usr/bin for binaries that are installed to a non-system directory. LibreOffice is one of those. The openjdk packages do not create symbolic links in /usr/bin but they do so in other places. Finding the java and javac binaries is accomplished differently: (2) The Slackware JDK and JRE packages install profile scripts into /etc/profile.d/ . If the user logs in (or starts an X terminal with a login session) this profile script will be sourced and this will expand several variables so that your Java will work properly: PATH, MANPATH and JAVA_HOME. See below for the content of the profile script for bash-compatible shells on a 64bit Slackware computer: $ cat /etc/profile.d/openjdk.sh #!/bin/sh export JAVA_HOME=/usr/lib64/java export MANPATH="${MANPATH}:${JAVA_HOME}/man" export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" If you do not start a login shell you will miss loading important other profile scripts as well, not just the openjdk one. Cheers, Eric -- Eric Hameleers Home: http://alien.slackbook.org/blog/