Configuring the Java Development environment under Mac

Source: Internet
Author: User

A:JDK environment Configuration  1, open terminal terminal;2, enter the current user home directory, CD ~;3, temporary authorization, sudo su;4, enter password (password not shown); 5. bash_profile file, touch. Bash_ Profile (if there is no need to create new, I do not); 6. bash_profile file, open. Bash_profile (can open then new success), 7, execute VI base_profile edit file, 8, enter the JDK file path, The system default is 1.6, my is 1.8, can be configured for two, convenient to switch later. Export Java_6_home=/library/java/javavirtualmachines/1.6.0.jdk/contents/homeexport JAVA_8_HOME=/Library/Java/ Javavirtualmachines/jdk1.8.0_51.jdk/contents/homeexport java_home= $JAVA _8_home Save and exit; 9. Read and execute the command in the file, source. bash_ PROFILE;10, enter java-version in terminal, display JDK information, then the configuration is successful.   b:sts, MySQL, Oracle, and Visual Tools workbench/navicate for Mysql/plsql to download the Mac version of the website.  C: The server Tomcat configuration first downloads the tomcat file and then extracts it to the appropriate resource directory. Enter sudo chmod 755/library/tomcat/bin/*.sh, at which point the terminal will let you enter the password, that is your computer password   start Tomcat to continue to enter cd/library/tomcat/bin/in the terminal, Enter Bin directory   continue sudo sh startup.sh after terminal will display:  using catalina_base:/library/tomcat using catalina_home:/ Library/tomcat using catalina_tmpdir:/library/tomcat/temp using jre_home:/Library/Java/ javavirtualmachines/Jdk1.8.0_101.jdk/contents/home using CLASSPATH:/library/tomcat/bin/bootstrap.jar:/library/tomcat/bin/ Tomcat-juli.jar tomcat started.  This time the TOMCAT server is turned on, verified, entered in the browser: localhost:8080 if the following interface appears, the installation is successful   If you need to close shutdown.sh  sh/library/tomcat/bin/catalina.sh version here is a look at the Tomcat release .  said I encountered in the installation of the pit, Just start the installation of the time to search someone else's blog, follow their steps to operate, but at the terminal always appear no such file or directory such as the error message. Then the blog practice is to enter the account password, and there is no bin directory, resulting in an error. Write this blog is also hope and I met the same situation of students can take a little detour. Installation of  d:mysql 1. Go to the MySQL website to download the Mac version of the installer. 2. Go to the official website to download the Mac version of MySQL Workbench. 3. Change the. bash_profile file to set the MySQL information to the MAC console. On the command line, enter open. Bash_profile and then alias Mysql=/usr/local/mysql/bin/mysqlalias mysqladmin=/usr/local/mysql/bin/ Mysqladmin append to the last side, if the file does not exist, create one yourself and then save and then enter source. Bash_profile can finally use MySQL to use the shell to use the console command 4. Change MySQL initial password step1:  apple---system preferences, bottom point MySQL close MySQL service in popup page (click Stop MySQL server) Step2: Enter terminal input: cd/usr/local/ mysql/bin/login administrator right after sudo su returns enter the following command to disable the MySQL authentication feature./mysqld_safe--skip-grant-tables & MySQL will restart automatically after enter (the MySQL status in the preferences will become running  step3.  enter command./mysql enter command after FLUSH privileges;  carriage return, enter command SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Your new password ');  this, the password modification is completed, can be successfully logged in.    

Configuring the Java Development environment under Mac

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.