Build a Java development environment on your Mac

Source: Internet
Author: User

Installing the JDK on your Mac

Download for 1.JDK
If you want to install JDK7 or JDK8 can go directly to the official website to download, to install JDK6, go to the Apple Developer's website downloaded
Download URL: http://connect.apple.com/

2. Default installation path
JRE Path:/system/library/frameworks/javavm.framework/
JDK Path:/library/java/javavirtualmachines/
Path to Java_home:/library/java/javavirtualmachines/1.6.0/contents/home
Note: The 1.6.0 directory name is related to the installed JDK version, using your own actual path,
There are also other versions of the JDK under/system/library/frameworks/javavm.framework/versions/
You can configure it, use a different version, and notice that there are several soft links on the line.

3. About Rt.jar, Jsse.jar, Tools.jar
In the classes under the/system/library/java/javavirtualmachines/1.6.0.jdk/contents
Rt.jar and Tools.jar are integrated into Classes.jar, so you're going to link them to/system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/ Lib in
Jsse.jar do likewise to the processing.


4. Configure Environment variables
Java_home=/system/library/frameworks/javavm.framework/versions/1.6.0/home
Path= $PATH: $JAVA _home/bin
Classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/rt.jar
Export PATH java_home CLASSPATH

Execute source/etc/profile to make the configuration file effective

Description: This article refers to: http://kennylee26.iteye.com/blog/1772638

Build a Java development environment on your Mac

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.