6

Below is the java I installed in ubuntu 16.04, but I am unable to find Javac and Jps in this. Can someone help how to get them.

$ java -version    
openjdk version "1.8.0_131"    
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

$ update-alternatives --get-selections | grep java    
java                           auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java    
jexec                          auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec    
jjs                            auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/jjs    
keytool                        auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool    
orbd                           auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/orbd    
pack200                        auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/pack200    
rmid                           auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmid    
rmiregistry                    auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/rmiregistry    
servertool                     auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/servertool   
tnameserv                      auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/tnameserv   
unpack200                      auto     /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/unpack200

I am unable to see JPS and JAVAC. Can anyone help?

4 Answers 4

4

How did you install java 8?

Perhaps you installed only JRE?

sudo apt-get install openjdk-8-jre

This will install java run time environment, typically in:

/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

When you should have done:

sudo apt-get install openjdk-8-jdk

Which shall install compiler in (usually):

/usr/lib/jvm/java-8-openjdk-amd64/bin/javac

If you can't get openjdk to work you can try Oracles java via www.webupd8.org

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

That results in:

java -version
  java version "1.8.0_131"
  Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
  Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)<br>

which javac
/usr/bin/javac

Which links to:

  /usr/lib/jvm/java-8-oracle/bin/javac
1
  • (When you should have done: sudo apt-get install openjdk-8-jdk) I installed the same, but no luck. I am not seeing either Javac or JPS.
    – chandrapvs
    Jun 14, 2017 at 0:46
3

I resolved the issue by running the below command, simply installing all the java packages.

sudo apt-get install openjdk-8*

Wish I'd done it in the first place. Thanks all for your replies.

0

In Amazon Linux, the yum package with just the JRE is called java-1.8.0-openjdk and the yum package with the JRE and JDK is called java-1.8.0-openjdk-devel.

If this is your issue, the solution would be adding the -devel to your yum install command: yum install java-1.8.0-openjdk-devel -y

I agree calling the package with the JRE, "jdk" is dumb so don't hate on the messenger.

1
  • 2
    How is it related to Ubuntu?
    – Pilot6
    Feb 19, 2019 at 18:08
0

Go to exact path/usr/local/java/jdk-8u211-linux-x64/jdk1.8.0_211/bin execute ./jps you can see all sunning hadoop nodes

1
  • 1
    see all running hadoop nodes
    – karel
    Jul 4, 2019 at 17:04

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.