Build a Java environment on your Mac and write to yourself in this article

Source: Internet
Author: User
Tags java se

Recent job-hopping to calculate the time, or feel these two years a little impetuous, always want to put their own zero, summed up the road again.

Before the windows on the Java, since into the hole in the iOS, Mac has not done, now by interviewing Facebook preparation time, set up the Java development environment, tidy up the algorithm (actually forget, this time definitely not, but at least prepared, and then have the opportunity to go). Provide some information is Java description of the algorithm, with C/OC implementation also need to translate, first write Java good.

I just toss the good environment in the morning. Summarize the pits you have encountered ...

1. Install Eclipse, official: https://www.eclipse.org/downloads/download.php?file=/oomph/epp/oxygen/R/eclipse-inst-mac64.tar.gz

2. Unzip the installation, because the Mac system comes with the Java environment, you can use this command to view:/usr/libexec/java_home-v or Direct view path:/library/java/javavirtualmachines/

But I have the jre1.6 version here by default, so I checked how to build/update the Java environment.

3. Download the JDK and JRE first, both from Oracle's official download: http://www.oracle.com/technetwork/java/javase/downloads/index.html

I have a little problem here, first installed JDK8 found that the JRE version is older, and then update JRE1.8, installed JRE detection found the JRE version is still old,/usr/libexec/java_home-v display:

1.6.0_65-b14-468, x86_64: "Java SE 6" /library/java/javavirtualmachines/1.6.0.jdk/contents/home

1.6.0_65-b14-468, i386: "Java SE 6" /library/java/javavirtualmachines/1.6.0.jdk/contents/home

/library/java/javavirtualmachines Directory is also only 1.6 version of the virtual machine, so it is strange, searched, tossing and finishing found very simple,

4. Only need to install the JDK once more, that is, it is best to update the JRE first, then install the JDK is no problem, and then with the command/usr/libexec/java_home-v view, a line more:

1.8.0_151, x86_64: "Java SE 8" /library/java/javavirtualmachines/jdk1.8.0_151.jdk/contents/home

5. To install eclipse again, it's done, and it's ready to install Eclipse, which can be used directly in Java.   

Note: If you want to use some new tools you can, but I think there may be Java, Python, C + + or other languages, so first with eclipse is good, need to change, a tool.

Build a Java environment on your Mac and write to yourself in this 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.