Mac OS X 10.10 Yosemite Install Java, JDK, MySQL, maven, idea

Source: Internet
Author: User
Tags mysql download

Mac OS X Yosemite was officially released on October 17, 2014.

As a Java developer, early adopters installed the latest version of the first time.

and the previous OS X system is still a lot different. Here's a note on the Java development environment.

1. JDK Installation

By default, the 10.10 system also does not have a JDK installed, nor does it automatically download the JDK to an Apple server.

There are two options, one is to download the latest version of the JDK (1.8.0_25) on the Oracle website, and the other is to download the 10.9 1.6.0_65 version of the JDK, which is officially provided by Apple,

1.6.0_65 version: http://support.apple.com/kb/DL1572

2. mysql Installation

To the website of MySQL download for 10.9 version and above the DMG or tar files, I download the dmg file here, double-click installation, note that during the installation process, you need to change the installation options, the [Startup Item] option is removed, or you will be prompted to install failure, the main reason is " MySQL Start on Restart script fails ".

Since MySQL is installed, the auto-start option is not selectable, resulting in MySQL not starting automatically. The solution is as follows:

Create a new plist file with the name: Com.mysql.plist and edit its contents as follows:

<?xml version= "1.0" encoding= "UTF-8"? ><! DOCTYPE plist Public "-//apple//dtd plist 1.0//en" "Http://www.apple.com/DTDs/PropertyList-1.0.dtd" ><plist Version= "1.0" >        <dict>                <key>Label</key>                <string>com.mysql</string>                <key>ProgramArguments</key>                <array>                        <string>/usr/local/mysql/bin/mysqld_ safe</string>                </array>                <key>RunAtLoad</key>                <true/>                <key> keepalive</key>                <false/>        </dict></plist>

Once saved, move it to (or make a soft link) to the/library/launchdaemons directory and execute the command.

Launchctl load-w Com.mysql.plist

So far, MySQL can start up as the system starts.

3. MAVEN Installation

To the Apache official website to download the latest version, unzip to the specified location, I specify here to extract the location of the/usr/local directory;

Edit the ~/.bash_profile file and add the contents to the file:

Export java_home= "/library/java/javavirtualmachines/jdk1.8.0_25.jdk/contents/home" Export path= "$JAVA _home/bin:$ PATH "Export m2_home="/usr/local/maven "Export m2=" $M 2_home/bin "Export path=" $M 2: $PATH "Export path="/usr/local/mysql /bin: $PATH "

After saving, execute

source. bash_profile

You can now run

MVN--version

If the test is successfully installed, the version information of MAVEN will be printed successfully

$ mvn--versionapache maven 3.2.3 (33F8C3E1027C3DDDE99D3CDEBAD2656A31E8FDF4; 2014-08-12t04:58:10+08:00) maven Home:/ Usr/local/mavenjava version:1.8.0_25, Vendor:oracle Corporationjava home:/library/java/javavirtualmachines/ Jdk1.8.0_25.jdk/contents/home/jredefault LOCALE:ZH_CN, platform Encoding:utf-8os name: "Mac OS X", Version: "10.10", arc H: "X86_64", Family: "Mac"

4. Intellij Idea Installation

If the JDK version installed earlier is 1.6, this may not be a problem;

If you install a JDK version of 1.8, you will need to change it in the following steps:

1, first drag and drop IntelliJ idea into the/applications directory (installation);

2, double-click IntelliJ Idea, run, you will be prompted to run the JRE environment, and prompted to download the Apple official website; Note: I have installed 1.8 here, why also install jdk1.6 it? This is completely unnecessary, how to do? Go down ...

3. Right-click on IntelliJ idea.app, display package contents->contents->info.plist, apply text or default Xcode open, find

<string>1.6*</string>

Change 1.6 to 1.8 to save the exit. Open IntelliJ Idea,ok again, success.

4, open the relevant parameters can be set.

Mac OS X 10.10 Yosemite Install Java, JDK, MySQL, maven, idea

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.