Where is Java on Mac? This article will help you understand it!

Source: Internet
Author: User

This article may be suitable for those who often develop Java programming on Mac or use Java tools frequently. If you do not care about Java or do not know Java, you can bypass this article ~

1. In Mac, when you enter Java-version on the [terminal], where is the Java executed? The which Java command can be seen as [/usr/bin/Java]

2. [/usr/bin/Java] is just a replacement, actually pointing to [/system/library/frameworks/JavaVM. framework/versions/current/commands/Java], LS-l Java, you can see

3. [/system/library/frameworks/JavaVM. framework/versions/current/commands/Java is not really Java, because the current folder is a replacement, it points to a version in the same directory, such as a folder, for example: (the advantage is that after multiple versions of Java are installed, you can easily adjust the current direction so that different versions of Java become the system's default, this can be adjusted in [utility]> [Java preference settings)

4. The a folder mentioned in point 3rd is generated by the system after Java is installed. The commands folder contains a Java executable file, this Java actually calls the genuine Java itself-> [/library/Java/javavirtualmachines/1.6.0 _ 37-b06-434.jdk/contents/home/bin/Java] (you can try to change this Java names, enter Java in the terminal to understand)

PS: the version number (1.6.0 _ 37-b06-434) may be different from each other, or multiple versions may exist. It depends on the number of Java versions installed on your machine.

5. In the final analysis, [/library/Java/javavirtualmachines/1.6.0 _ 37-b06-434.jdk/contents/home/bin/Java] is the real worker. Hey, let's get around.

Remarks: This article Reprinted from: http://www.mactech.cn/a/234.html

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.