如何为Mac OSX将Java 7 EE SDK下载为.sh文件安装 [英] How to install Java 7 EE SDK download as .sh file for Mac OSX

查看:145
本文介绍了如何为Mac OSX将Java 7 EE SDK下载为.sh文件安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是不熟悉在Mac OSX上开发Java的人.我想下载Java 7 EE SDK,以便可以同时使用Java进行桌面/移动/企业开发.下载文件是我不熟悉的.sh(特别是java_ee_sdk-7-jdk7-macosx-x64). Java 7 SE SDK是.dmg文件,它是企业版所期望的格式,而不是.sh文件.

I am new to developing Java on Mac OSX. I wanted to download the Java 7 EE SDK so I could both desktop/mobile/enterprise development with Java. The download file is .sh (specifically java_ee_sdk-7-jdk7-macosx-x64) which I am not familiar with. The Java 7 SE SDK is a .dmg file which is the format I expected for the Enterprise Edition instead of the .sh file.

  1. 为什么SE和EE版本的文件格式不同? (.sh.dmg)
  2. 如何安装企业版,因为它是.sh 文件?
  1. Why are the SE and EE editions different file formats? (.sh vs .dmg)
  2. How do I install the Enterprise Edition being that it is a .sh file?

*注意:目前,我在Mac上安装的唯一JRE是我所认为不赞成使用的Apple版本.

*Note: Currently the only JRE I have installed on the Mac is the Apple version which I understand has been deprecated.

推荐答案

在命令行中运行它.

从安装手册中: Java平台,企业版7 SDK-安装说明

Solaris,Linux和Mac OS X系统:

  • 如有必要,授予执行 分发文件的权限:chmod + x ./ 分发文件名

  • If necessary, grant execute permissions to the distribution file: chmod +x ./ distribution-filename

在命令提示符下,键入:sh ./ 分发文件名

At the command prompt, type: sh ./ distribution-filename

*.sh文件是 shell脚本,以供将来参考.您可以在文件的第一行检查 shebang (#!)看看应该使用什么shell来解释脚本.对于JavaEE 7安装程序,shebang是#!/bin/sh,表示应该 Bourne兼容shell 被使用.

For future reference a *.sh file is a shell script. You can inspect the shebang (#!) at the first line of the file to see what shell should be used to interpret the script. In the case of the JavaEE 7 installer the shebang is #!/bin/sh which indicates a Bourne compatible shell should be used.

这篇关于如何为Mac OSX将Java 7 EE SDK下载为.sh文件安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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