New MAC Configuration Java development environment

Source: Internet
Author: User
Tags exit in

Today, the MAC has to be equipped with some of the development environments used to make some records here.

1. Download Eclipse, Address: http://www.eclipse.org/downloads/, because of personal needs, so downloaded is the Java EE IDE, after the download is complete, the run prompt requires the JDK 6.0 environment, At this point, we need to download the JDK to Oracle website, I downloaded the latest version (8U45), Address: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html. After the above operation, Eclipse can run successfully.

2. Download Tomcat, Address: http://tomcat.apache.org, I was downloading Tomcat 8.0, download complete and unzip, Get the folder apache-tomcat-8.0.24, then need to put it in the Library directory, operating under the terminal: MV apache-tomcat-8.0.24./library. Then go to the directory apache-tomcat-8.0.24/bin/, you will see a lot of. sh script files, give them executable permissions, instructions are: sudo chmod 755 *.sh, because the root permission is used, so you will be prompted to enter the password And then execute the startup.sh file, there will be some prompt message, and so it executes, without error, Tomcat has been started. Then we open the browser, enter http://localhost:8080/will see the Welcome screen.

3. Download the Tomcat plugin Tomcatplugin.jar used in Eclipse, address: http://www.eclipsetotale.com/ tomcatplugin.html, after the download is done, unzip it into the plugins folder under the Eclipse directory, if there is only one Eclipse icon, you can right-click on the contents of the package, then find the Plugins folder, and then restart Eclipse, you will see in the toolbar 3 about to The MCAT button is to start the service, stop the service, and restart the service, respectively. We also need to configure the Tomcat directory in Eclipse Preferences, which is relatively simple. When we develop, we also need to configure a server, which will also use the path of Tomcat, it is relatively simple.

4. We will certainly use the database when we carry out the Java EE Development, here we introduce the configuration MySQL. First need to download MySQL, address: http://www.mysql.com/downloads/, find the right version, I was downloading the Community version, find MySQL Community Server, download the DMG format ( MYSQL-5.6.25-OSX10.9-X86_64.DMG), and then double-click the installation, and after successful installation, the MySQL icon is displayed at the bottom of "system Preferences" to start and close the MySQL service.

5. Developers often use terminals to briefly describe the configuration of Terminal Bash. First create a. bash_profile file under your own user, write to export path= in a file $PATH:/usr/local/mysql/bin/  means to add the path of some of MySQL's executable files to the environment variable After writing  alias Mysql=/usr/local/mysql/bin/mysql  , writing to MySQL at the terminal is the execution of the/usr/local/mysql/bin/mysql file. Some developers will use the VI under the terminal for development, when a. vimrc file can be configured to help with code writing. At this point is not very convenient place, that is, in the terminal using the TAB key Auto-completion, you need to distinguish between uppercase and lowercase letters, we can configure a. inputrc file, write set completion-ignore-case on   save and exit in the file, Then, when you use the TAB key to auto-complete, you ignore the case of uppercase and lowercase letters.

6. Then configure MySQL. After the configuration of the above steps, it is now possible to enter MySQL directly at the terminal to connect to the MySQL database. MySQL root user default password is empty, here to modify the root password, command: mysqladmin-u root password ' ****** '; Use the root user to enter MySQL, create a user for their own use, instructions: Insert Into Mysql.user (Host,user,password) VALUES ("localhost", "UserName", Password ("******")); If this instruction fails, you can try another command: Grant usage on *. * to ' userName ' @ ' localhost ' identified by ' ****** ' with GRANT option;  Where username is the user name, ****** is the password, then refreshes the System permissions table, instructions: flush privileges;  Next also need to create a database TestDB for this user to use, instructions: Create DATABASE TestDB; Grant all permissions to this user, instruction: Grant all privileges on testdb.* to [email protected] identified by ' ****** ';

Now that the basic configuration is complete, you can explore the mysteries of Java EE development.

New MAC Configuration Java development environment

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.