安装后在Linux哪里可以找到Java SDK? [英] Where can I find the Java SDK in Linux after installing it?

查看:237
本文介绍了安装后在Linux哪里可以找到Java SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用apt-get install安装了JDK,但我不知道我的jdk文件夹在哪里.我需要为此设置路径.有人知道这个位置吗?

I installed JDK using apt-get install but I don't know where my jdk folder is. I need to set the path for that. Does any one have a clue on the location?

推荐答案

这取决于您的打包系统...如果java命令有效,则可以键入readlink -f $(which 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,在其他版本中) Sun JDK的/usr/lib/jvm/的子目录(我认为还有其他实现).

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

Debian相同.

对于任何给定的软件包,您都可以通过查询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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆