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-, 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- -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.

  • 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 – Baba Dec 27 '15 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.