Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-18-2012, 06:05 AM   #1
Registered: Jun 2004
Distribution: Slack x86 current
Posts: 134

Rep: Reputation: 16
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
Old 10-18-2012, 06:10 AM   #2
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 846

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
may be it's a stupid suggestion, but did you try just restarting the computer?
Old 10-18-2012, 06:54 AM   #3
Registered: Jul 2006
Location: Gießen, Germany
Distribution: Slackware64-14.2 & -current
Posts: 799

Rep: Reputation: 49
Originally Posted by Barx View Post

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
Old 10-18-2012, 07:32 AM   #4
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 347

Rep: Reputation: 189Reputation: 189
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.
Old 10-18-2012, 02:55 PM   #5
Slackware Contributor
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 229Reputation: 229Reputation: 229
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.
1 members found this post helpful.
Old 10-19-2012, 02:36 AM   #6
Registered: Jun 2004
Distribution: Slack x86 current
Posts: 134

Original Poster
Rep: Reputation: 16
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)


Old 10-20-2012, 10:20 AM   #7
Registered: Dec 2005
Distribution: Fedora, CentOS
Posts: 514

Rep: Reputation: 66
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.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
java applet not loading image with relative path but loads image with absolute path amolgupta Programming 2 07-20-2009 01:58 PM
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
Ubuntu 7.10 64bit - how to set java path to/redirect java to ? Thane Ubuntu 1 03-25-2008 05:52 PM
export Path=/usr/java:$Path does not seem to work lumix Linux - Newbie 1 03-19-2007 03:11 PM
Java can't find package, but PATH set correctly (j2se1.4.0, java.util.regex package) Ethan Programming 5 02-06-2004 09:55 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration