$JAVA_HOME path unspecified when Installing openjfx on Slackware via SlackBuild script

176 Views Asked by At

According to $java -version:

openjdk version "1.8.0_91"
OpenJDK Runtime Environment (IcedTea 3.0.1) (Slackware)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

Executing the SlackBuild script says:

"No valid JRE installation found in [$JAVA_HOME] to match ARCH $ARCH or $[JAVA_HOME] not set properly."

Indeed there's no declaration(?) inside the script itself for $JAVA_HOME for some reason. How can this be fixed?

1

There are 1 best solutions below

0
On

You need to relogin after {open,}jre/jdk install so new *.sh and *.csh files installed in /etc/profile.d/ make right environment.

Use root login shell (su -) to run the SlackBuild.

What is the name of SlackBuild you mean? openjfx.SlackBuild checks JAVA_HOME env var:

if ! echo $JAVA_HOME | grep 64 ; then
  echo "No valid JRE installation found in $JAVA_HOME to match ARCH $ARCH or $JAVA_HOME not set properly."; exit 1
fi

openjfx requires openjdk8 that has profile.d/openjdk8.{sh,csh} scripts to set JAVA_HOME environment variable at user login (via /etc/profile run). On 64-bit system openjdk8.SlackBuild patches the scripts for /lib64/ instead of /lib/.