美文网首页
Mac 搭建Java Web开发环境

Mac 搭建Java Web开发环境

作者: LJ说_LjNotes | 来源:发表于2017-11-01 01:17 被阅读178次

1. Java

skip

2. Tomcat

(1) Download it

http://tomcat.apache.org/

(2) Unzip to a directory where you want to put your tomcat, like /Library/Tomcat

(3) Change its execution permission: chmod +x /Liabrary/Tomcat/bin/*.sh

(4) Start Tomcat: ./bin/startup.sh

(5) Shut down Tomcat: ./bin/shutdown.sh

3. Eclipse

Preference -> Server -> Runtime environments

4. MySQL

Download: https://dev.mysql.com/downloads/mysql/

copy the default password: root@localhost: ********

Log in: mysql -u root -p

Reset password: set PASSWORD = PASSWORD('password');

5. JDBC

Java Database Conectivity

Class.forName("com.mysql.cj.jdbc.Driver").newInstance();

Connectionconn=DriverManager.getConnection("jdbc:mysql://localhost:3306/foo","root","password");

Statementstmt=conn.createStatement();

stmt.execute("SELECT * FROM `FOO.BAR`");

stmt.close();

conn.close();

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-usagenotes-connect-drivermanager.html

相关文章

网友评论

      本文标题:Mac 搭建Java Web开发环境

      本文链接:https://www.haomeiwen.com/subject/zcfwpxtx.html