New Mac configuration Java development environment, mac configuration java Development

Source: Internet
Author: User

New Mac configuration Java development environment, mac configuration java Development

Today, when Mac is ready, you need to configure some development environments for use. Here are some records.

1. download Eclipse at http://www.eclipse.org/downloads/. for personal needs, the download is Java ee ide. After the download is complete, run the prompt that JDK 6.0 is required. Download JDK from the Oracle official website. The latest version (8u45) is downloaded ), address: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html. After the above operations, Eclipse can be successfully run.

2. download tomcat, address: http://tomcat.apache.org, I downloaded tomcat 8.0, download and decompress, get the folder apache-tomcat-8.0.24, and then need to put it under the Library directory, operate on the terminal: mv apache-tomcat-8.0.24. /Library. Then go to the apache-tomcat-8.0.24/bin/directory, and you will see a lot. sh script file, give them executable permissions, command: sudo chmod 755 *. sh, because the root permission is used, a prompt will be prompted to enter the password; then execute startup. sh file, some prompts will appear, wait until the execution is complete, if there is no error, tomcat has started. In this case, open the browser and enter http: // localhost: 8080/to view the welcome page.

3. Download the Tomcat plug-in tomcatPlugin. jar used in Eclipse. Address:. We also need to configure the Tomcat directory in the Eclipse preference settings, which is relatively simple. At the time of development, we also need to configure a Server, which also uses the Tomcat path, which is relatively simple.

4. We will definitely use the database when developing Java ee. Here we will introduce how to configure MySql. First you need to download MySql, address: Login Community Server, download dmg format (mysql-5.6.25-osx10.9-x86_64.dmg), and then double-click the installation, after the installation is successful, the "system preference settings" at the bottom of the MySql icon, it is used to start and stop the MySql service.

5. Developers often use terminals. Here is a brief introduction to terminal bash configuration. First, create. in the bash_profile file, write export PATH = $ PATH:/usr/local/mysql/bin/to add the PATH of some MySql execution files to the environment variable; after writing data to alias mysql =/usr/local/mysql/bin/mysql, write data to mysql on the terminal and run the/usr/local/mysql/bin/mysql file. Some developers will use the VI under the terminal for development. At this time, a. vimrc file can be configured to facilitate code writing. At this point, it is not very convenient, that is, to use the tab key to automatically complete the whole time under the terminal. It must be case-sensitive. We can configure one. in the inputrc file, write set completion-ignore-case on to save the file and exit. Then, use the tab key to automatically complete the whole time to ignore the case-insensitive letters.

6. Configure MySql. After completing the preceding steps, you can directly enter mysql on the terminal to connect to the MySql database. The default password of the root user in MySql is null. Here, modify the root password and run the command: mysqladmin-u root password '******'. Use the root user to access MySql, create a user for your own use. Command: insert into mysql. user (Host, User, Password) values ("localhost", "userName", password ("******"); If this command fails to be executed, you can try another command: grant usage on *. * to 'username' @ 'localhost' identified by '******' with grant option; where userName is the user name and ***** is the password, then refresh the system permission table. Command: flush privileges. Next, create a database testDB for this user. Command: create database testDB. Grant all permissions to this user. command: grant all privileges on testDB. * to userName @ localhost identified '******';

Now, the basic configuration has been completed. You can explore the mysteries of Java EE development.

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.