Install JDK1.6 on Mac OS X and related memos

Source: Internet
Author: User



1. Install JDK1.6
Www.2cto.com
The oracle official website has a Mac installation package starting from jdk1.7, but some projects must use jdk1.6, so jdk1.6 must be installed through other channels.

Check the discovery, to install JDK 1.6, you can install the java support package provided directly from the apple developer website, the specific http://connect.apple.com/

For details, refer to this article
Http://stackoverflow.com/questions/6614380/jdk-on-osx-10-7-lion

2. Package path and other issues

JRE path installed by default
/System/Library/Frameworks/JavaVM. framework/

JDK packages installed on oracle, apple, and other devices are available at www.2cto.com.
/Library/Java/JavaVirtualMachines/

3. Where is JAVA_HOME?
/Library/Java/JavaVirtualMachines/1.6.0 _ 38-b04-436.jdk/Contents/Home

Note: The name of the 1.6.0 _ 38-b04-436.jdk directory is related to the installed jdk version.

4. Where Are rt. jar and jsse. jar?
Rt. jar has been integrated into/Library/Java/JavaVirtualMachines/1.6.0 _ 38-b04-436.jdk/Contents/Classes/classes. jar

Jsse. jar is also in the Classes directory

We recommend that you set classes. jar and jsse. jar to create a soft connection to/Library/Java/JavaVirtualMachines/1.6.0 _ 38-b04-436.jdk/Contents/Home/lib/, and classes. the soft connection of jar is named rt. jar

In this way, you can avoid the problem that rt. jar cannot be found, for example, when obfuscation codes are used. Www.2cto.com 5. Configure the environment variable file of JAVA_HOMEMac OS X in/etc/profile, which is always an important file of unix. Add the Xml Code JAVA_HOME =/Library/Java/JavaVirtualMachines/1.6.0 _ 38-b04-436.jdk/Contents/Home/export JAVA_HOME at the bottom, save the code, and log out. Note: After JAVA_HOME is added, the system will also use the jdk of JAVA_HOME you configured as the default JDK.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.