How to install a specific JDK on Mac OS X?

后端 未结 16 829
南方客
南方客 2020-11-29 15:21

I want to install a specific JDK (the latest for example). For this, I went to the JDK download homepage: http://java.sun.com/javase/downloads/index.jsp. I looked for a Mac

相关标签:
16条回答
  • 2020-11-29 15:53

    The easiest way is to use Homebrew. Install Homebrew and then:

    brew tap caskroom/versions
    brew cask install java7
    

    You can list all available versions using the following command: brew cask search java

    0 讨论(0)
  • 2020-11-29 15:53

    If you installed brew, cmd below will be helpful:

    brew cask install java

    0 讨论(0)
  • 2020-11-29 15:55

    As the message says, you have to go to Apple, not Sun, for Java on the Mac. As far as I know, Apple JDK 6 is installed by default on Mac OS X 10.6 (Snow Leopard). Maybe you need to install the developer tools from your Mac OS X installation DVD (the dev tools are an optional install from the OS DVD).

    See: http://developer.apple.com/java/

    NOTE This answer from 16 Oct 2009 is now outdated; you can get the JDK for Mac OS X from the regular JDK download page on Oracle's website now.

    0 讨论(0)
  • 2020-11-29 15:56

    Mac comes with the JDK, for more information check:

    http://developer.apple.com/mac/library/documentation/Java/Conceptual/Java14Development/02-JavaDevTools/JavaDevTools.html

    0 讨论(0)
  • 2020-11-29 15:58

    JDK is the Java Development Kit (used to develop Java software).

    JRE is the Java Runtime Environment (used to run any .jar file 'Java software').

    The JDK contains a JRE inside it.

    On Windows when you update Java, it updates the JRE automatically.

    On Mac you do not have a JRE separated you have it, but inside the JDK, so when you update Java it will update your JRE which is inside your JDK; it doesn't install an JDK for you. You need to get it from somewhere else.

    0 讨论(0)
  • 2020-11-29 15:59

    As of Mac OS X v10.6 (Snow Leopard), you can run Java 6 in 32-bit mode on either 32-bit or 64-bit Intel processor equipped Macs.

    If you cannot upgrade to Snow Leopard, Soy Latte is a pre-compiled version of Java 6 for Intel 32-bit.

    0 讨论(0)
提交回复
热议问题