Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I'm trying to install and run the jdk/jre on linux to run app project compilation/signing/etc. actions from the command-line. To install, I used the following command:

yum install java-1.8.0-openjdk-devel.x86_64

This installs java to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64, with bin, lib, etc. being in the immediate directory.

Even without messing with environment variables, when trying to run this:

 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/bin/java -version

I get the following errors:

Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.

I'm not actually finding libjava.so in any of the lib directories either. Seems kind of silly that it wouldn't be included with the package.. or maybe there's just another dependency package I'm missing? Any insight here would be very appreciated.

share|improve this question
    
What is your distribution? Have you tried to run java -version? I use Mint and there java is installed in such a way that everything is found through the 'normal' environment variables. – Marco Dec 27 '15 at 9:03
    
I actually get '-bash: java: command not found' when trying to run java directly. I'm using CentOS 6. – Branden Dec 27 '15 at 9:39
    
@Branden : why install devel package? install JDk/JRE with this toturial digitalocean.com/community/tutorials/… and run java – Babyy Dec 27 '15 at 10:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.