-   Slackware (
-   -   java not in PATH (

Barx 10-18-2012 06:05 AM

java not in PATH

maybe it's my fault .. but maybe not :-)

I've installed JRE 7u7 using the slackbuild from /extra/java

The package was created and installed successfully.

But if I type 'java' on the shell I get a command not found error (both as root or user)

So I think that the java executable is not on the PATH.

Of course a symlink or a PATH addiction will fix .. but I expect that this should be done automatically by the script in the package installer.

I've tried to investigate the slackbuild but I'm unable to find where this should be done; do can someone help me to investigate what's gone wrong?

Thank you all

Alessandro Barisone

solarfields 10-18-2012 06:10 AM

may be it's a stupid suggestion, but did you try just restarting the computer?

tramni1980 10-18-2012 06:54 AM


Originally Posted by Barx (Post 4808976)

I've installed JRE 7u7 using the slackbuild from /extra/java

The "java" command resides in /usr/lib64/java/bin for a 64 bit Slackware and in
/usr/lib/java/bin for 32 bit Slackware. Please check that:
1. the file /var/log/packages/jre-bla-bla contains the line /usr/lib64/java/bin/java
2. that "echo $PATH" confirms the presence of /usr/lib64/java/bin in your PATH

audriusk 10-18-2012 07:32 AM

Path to JRE binaries is set up in /etc/profile.d/ shell script. Log out and log in again after installing JRE package for it to take effect, or even simpler, source that file:

$ source /etc/profile.d/
The latter will work for the currently used shell only.

mRgOBLIN 10-18-2012 02:55 PM

You might have made the same mistake I once made...

Make sure you have all of the source files in the directory with the SlackBuild (including the profile.d directory) when you build the package.

Barx 10-19-2012 02:36 AM

Solved! first of all, I forgot to download the profile.d folder before creating the package (thank you audriusk); second, a logout-login puts java in the path correctly (thank you mRgOBLIN)



angryfirelord 10-20-2012 10:20 AM

Just as an additional note, AlienBob has packages of OpenJDK 7 for 14.0.

Installing the package will also add java to the appropriate path automatically.

All times are GMT -5. The time now is 06:52 AM.