我在哪里可以找到Linux中的Java SDK? [英] Where can I find the Java SDK in Linux?
问题描述
我使用apt-get install安装了JDK。我不知道我的jdk文件夹在哪里。我需要为此设置路径。有没有人知道该位置?
I installed JDK using apt-get install. I dont know where my jdk folder is. I need to set the path for that. Does any one has a clue on the location?
推荐答案
这取决于您的包装系统...如果 java
命令有效,你可以输入 readlink -f $(java)
来查找java命令的位置。在我现在的OpenSUSE系统上,它返回 /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/bin/java
(但是这不是使用 apt-get
的系统。
This depends a bit from your package system ... if the java
command works, you can type readlink -f $(which java)
to find the location of the java command. On the OpenSUSE system I'm on now it returns /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/bin/java
(but this is not a system which uses apt-get
).
在Ubuntu上,看起来好像在 / usr / lib / jvm / java-6-openjdk /
用于OpenJDK,以及其他一些子目录 / usr / lib / jvm /
用于Suns JDK(及其他实现)我想也是如此。
On Ubuntu, it looks like it is in /usr/lib/jvm/java-6-openjdk/
for OpenJDK, and in some other subdirectory of /usr/lib/jvm/
for Suns JDK (and other implementations as well, I think).
对于任何给定的包你可以确定它安装的文件和安装位置他们通过查询dpkg。例如包'openjdk-6-jdk': dpkg -L openjdk-6-jdk
For any given package you can determine what files it installs and where it installs them by querying dpkg. For example for the package 'openjdk-6-jdk': dpkg -L openjdk-6-jdk
这篇关于我在哪里可以找到Linux中的Java SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!