博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mac OS X上的Java安装位置在哪里?
阅读量:2290 次
发布时间:2019-05-09

本文共 1859 字,大约阅读时间需要 6 分钟。

本文翻译自:

I just downloaded Java 7u17 on Mac OS 10.7.5 from and then successfully installed it. 我刚刚从下载在Mac OS 10.7.5的Java 7u17 ,然后安装成功。 In order to do some JNI programming, I need to know where Java installed on my Mac. 为了做一些JNI编程,我需要知道在Mac上安装Java的位置。

I thought that inside the /Library/Java/JavaVirtualMachines/ folder, there would be a folder called 1.7.0.jdk or something, but then I found that the folder is empty. 我认为在/Library/Java/JavaVirtualMachines/文件夹中,会有一个名为1.7.0.jdk的文件夹,但后来我发现该文件夹是空的。 This was confirmed by running ls /Library/Java/JavaVirtualMachines/ in the Terminal. 通过在终端中运行ls /Library/Java/JavaVirtualMachines/来确认这一点。 I've tried searching for it to find out if it was installed somewhere else, but that doesn't seem to be turning anything up. 我已经尝试搜索它以查明它是否安装在其他地方,但这似乎并没有改变任何东西。

Could someone please tell me where Java is installed on my Mac? 有人可以告诉我Mac上安装Java的位置吗?


#1楼

参考:


#2楼

Turns out that I actually had the Java 7 JRE installed, not the JDK. 事实证明我实际安装了Java 7 JRE,而不是JDK。 The correct download link is . 正确的下载链接在 。 After installing it, jdk1.7.0jdk appears in the JavaVirtualMachines directory. 安装后, jdk1.7.0jdk出现在JavaVirtualMachines目录中。


#3楼

Edited: Alias to current java version is /Library/Java/Home 编辑:当前java版本的别名是/Library/Java/Home

For more information: 有关更多信息:


#4楼

使用unix find函数查找已安装的javas ...

sudo find / -name java

#5楼

Use /usr/libexec/java_home -v 1.8 command on a terminal shell to figure out where is your java 1.8 home directory 在终端shell上使用/usr/libexec/java_home -v 1.8命令来确定java 1.8主目录的位置

If you just want to find out the home directory of your most recent version of java, omit the version. 如果您只想查找最新版本java的主目录,请省略该版本。 eg /usr/libexec/java_home 例如/usr/libexec/java_home


#6楼

我刚刚安装了Java SE 7版本的JDK,发现它安装在与Apple的Java 6不同的目录中。它位于/ Library / Java ...而不是/ System / Library / Java ...运行/ usr / libexec / java_home -v 1.7 vs -v 1.6将确认这一点。

转载地址:http://njcnb.baihongyu.com/

你可能感兴趣的文章
控制台出现报错DevTools failed to load source map: Could not load content for chrome-extension://的原因及解决方案
查看>>
vue-cli 如何让Eslint 报错在浏览器控制台输出
查看>>
出现VW自适应方案报错already has a ‘content‘ property, give up to overwrite it的原因及解决办法
查看>>
vue3配置路由报错Catch all routes (“*“) must now be defined using a param with a custom regexp.
查看>>
VirtualBox中的Ubuntu没有权限访问共享文件夹/media/sf_bak
查看>>
Virtualbox中Linux添加一个新磁盘->创建分区->格式化->挂载分区
查看>>
VMware 虚拟机中添加新硬盘的方法
查看>>
在mac上安装和使用mysql-5.6.24
查看>>
AsyncSocket长连接粘包问题解决方案
查看>>
在FC6上构建内核驱动模块编译环境
查看>>
Linux操作系统下设置NFS共享
查看>>
用busybox-1.1.0打造自己的2410文件系统2
查看>>
实现DHCP自动获取IP地址
查看>>
S3C2410触摸屏驱动代码分析1
查看>>
S3C2410触摸屏驱动代码分析2
查看>>
S3C2410触摸屏驱动代码分析3
查看>>
网络管理器小程序找不到所需的资源……
查看>>
从 2.4 到 2.6:Linux 内核可装载模块机制的改变对设备驱动的影响
查看>>
Linux系统上双网卡绑定方法
查看>>
移植ucgui到s3c2410的步骤
查看>>