简体   繁体   English

在Linux机器上的Java安装文件夹中查找JDK

[英]Finding JDK inside java installation folder on a linux machine

I have been told that in a Linux machine java along with jdk has been installed in /usr/java path. 有人告诉我,在Linux机器中,java和jdk已安装在/ usr / java路径中。 But when I go to /usr/java/ i could so many files along with folder named bin,JRE. 但是当我转到/ usr / java /时,我可以找到这么多文件以及名为bin,JRE的文件夹。 I want to know where is jdk installed here? 我想知道jdk在哪里安装? Is bin folder itself is jdk? bin文件夹本身是jdk吗?

My ls output for openjdk7 looks like this: 我的openjdk7的ls输出看起来像这样:

ASSEMBLY_EXCEPTION  docs     jre  man      THIRD_PARTY_README
bin                 include  lib  src.zip

The jre folder contains the JRE, the other files are part of the JDK, and not necessary for running Java applications which need only a JRE (eg the javac compiler in bin ). jre文件夹包含JRE,其他文件是JDK的一部分,对于仅需要JRE的Java应用程序(例如binjavac编译器)的运行是不必要的。

打开终端并输入“ which java”,这将返回JDK安装路径

I guess you just installed the JDK under /usr/java. 我猜您刚刚在/ usr / java下安装了JDK。 Try run ls /usr/java/bin , if java and javac is in /usr/java/bin, we can conclude that the /usr/java folder IS the JDK folder itself. 尝试运行ls /usr/java/bin ,如果javajavac在/ usr / java / bin中,我们可以得出结论,/ usr / java文件夹就是JDK文件夹本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM