SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using slackware13 (32bit), and just installed the jre package to be able to use java programs, but when i try to execute the java command, it complains about not finding libjava.so
Code:
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.
libjava is located at
Code:
/usr/lib/java/lib/i386/libjava.so
And i've added the dir to ld.so.conf
I've tried symlinking the lib to /usr/lib but that doesn't work. I tried installing on another slack13 comp and there's no problem there :/
What happens if you define the full path to java while executing the program? /usr/lib/java/bin/java program
echo $PATH
Make sure java is in your path.
Are you using ssh by any chance? As Slackware does not explicitly export the java home with ssh. Normal ssh clients do not have an issue with this. I use an ssh client that does, and had to recompile ssh and add the java home to the default path.
You should find /usr/lib/java/bin {and / or} /usr/lib/java/jre/bin in your PATH and you should have JAVA_HOME in your environment as well. This is the output from the env-pipe-grep command from my laptop:
If not, you can add /usr/lib/java/bin (for the JDK) {and / or} /usr/lib/java/jre/bin (for the JRE) to the PATH varb in /etc/profile to set it up for all users:
Shucks. One difference I have (looking back at your first post) is that I did not add java.so to /etc/ld.so.conf, so there are no libraries from my JAVA_HOME Tree:
I thought said that you had added /usr/lib/java/lib/i386 to /etc/ld.so.conf ...
I am stumped ... ??? ...
Are you running the jdk java or the jre java (or something else) ?
Code:
$ which -a java
/usr/lib/java/bin/java
/usr/lib/java/jre/bin/java
I have both installed so I see both ...
Code:
$ /usr/lib/java/bin/java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
$ /usr/lib/java/jre/bin/java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
I thought said that you had added /usr/lib/java/lib/i386 to /etc/ld.so.conf ...
I am stumped ... ??? ...
Are you running the jdk java or the jre java (or something else) ?
Code:
$ which -a java
/usr/lib/java/bin/java
/usr/lib/java/jre/bin/java
I have both installed so I see both ...
Code:
$ /usr/lib/java/bin/java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
$ /usr/lib/java/jre/bin/java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
-- kjh
Sorry 'bout that, I did have /usr/lib/java/lib/i386 when i first posted but then tested some stuff and later removed it, either way it doesn't solve ma problem.
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
Ok, so i renamed /bin/java to java.bak and created a symlink to /usr/lib/java/bin/java instead.. And now i can execute java from cmd-line :/
Problem solved i guess
Sorry 'bout that, I did have /usr/lib/java/lib/i386 when i first posted but then tested some stuff and later removed it, either way it doesn't solve ma problem.
Ok, so i renamed /bin/java to java.bak and created a symlink to /usr/lib/java/bin/java instead.. And now i can execute java from cmd-line :/
Problem solved i guess
No Problem !
I wonder where /bin/java came from ?
I am still running Slackware 12.1 on my Laptop and I can't get at my brother's Slack 13.0-32 system right now ( logging out of KDE Kills his wireless so I can't ssh in until he logs in again )
Now that 'we' have KDE 4.3.2 in current, I happen to have Slackware-Current downloaded and ready to install on my laptop but I can't run tar -tvf ~/extra/jdk-6u16-i586-1.txz to see the contents of the package ...
Anyhow ... Thanks for the morning diversion before I get back into my 'day job' !
-- kjh
p.s. Anybody know how one would extract a .txz package on a Slackware 12.1 system without breaking tar and *pkg* on 12.1 ?
p.s. Anybody know how one would extract a .txz package on a Slackware 12.1 system without breaking tar and *pkg* on 12.1 ?
For the future ...
I built and installed the xz binary on my Slackware 12.1 system from ~/slackware-13.0-32/source/a/xz/xz-4.999.8beta.tar.bz2
Now that I have xz, I can browse the .txz packages like so:
Code:
xz -cd <<some_package>>.txz |tar -tvf - |less -eX
I am interested in the jdk because I do a bit of Java Development so I wanted to make sure the upgrade to 13.0-32 would not break my system ...
I looked at ~/slackware-13.0-32/slackware/l/jre-6u16-i586-1.txz and ~/slackware-13.0-32/extra/jdk-6/jdk-6u16-i586-1.txz and the install.sh in each and there are no references to bin/ in the package or install.sh.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.