I am on a Mac. My current Java version is "1.6.0_65". Therefore i want to upgrade it to the latest. I typed the following command on my Mac terminal.

sudo apt-get install oracle-java7-installer

The error i got is sudo: apt-get: command not found. Then i tried using yum command instead. and the error i got it sudo: yum: command not found.

1.) Is there a way to install apt-get and yum on Mac, if so how?

2.) What is the command to upgrade Java using a Mac?

有帮助吗?

解决方案

Sudo apt-get is for Ubuntu or Debian, no for Mac. You only need to download java from Oracle or Apple servers and install!!

You can download this http://support.apple.com/kb/dl1573

其他提示

Apple provides a Java 6 implementation for Mac OS X, based on source code from Oracle's implementation.

Oracle provides a Java 7 implementation that incorporates source code provided by Apple. Apple staff cooperate in its development.

The old URL, nice and short, redirects to Oracle's download page:

http://java.sun.com/

From there navigate to the Java SE download page. Download JRE to run Java software. Download JDK if you want to develop new Java software. Download and run an installer app.

Currently that page URL is:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Oracle also provides an early release of Java 8 for Mac OS X.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top