根據老師給的攻略:
Setup Your Development Environment
1. Set up Java development environment
Build your JAVA development environment: Eclipse + JDK.
2. Set up database management system
Step 1. Download MySQL
https://dev.mysql.com/downloads/windows/installer/8.0.html
前兩步比較順利。第三步開始出現各種問題。Web課老師:“程序員就是,出現什麼問題,我們就解決什麼問題”。說的好。
3. MySQL GUI Tools
Step 1: Download GUI Tools and set up the software.
Step 2: Run the tools
Step 3:Connet MySQL db
問題一:MySQL Query Browser 連不上 數據庫。
原因:版本問題,mysql8.0版本,與mysql5.0版本的加密方式不同。
解決方案:https://blog.csdn.net/qq_40605167/article/details/81253976
中間還有各種囧:
接下來是第四步。
4.Tomcat
Step 1: download Tomcat
https://tomcat.apache.org/download-90.cgi
Step 2: unzip the package file.
And remember the directory.
And type” http://localhost:8080/” in your browse.
If you're seeing this, you've successfully installed Tomcat. Congratulations!
Step 3. Start your eclipse software
Step 4. Click menu “window”--> “preferences”
Step 5. The preferences dialog.
問題二:發現自己的eclipse裏preference沒有server選項。
原因:eclipse版本太高了。
搜了一下攻略:https://www.cnblogs.com/xiaoxiaoweng/p/7298183.html
問題三:上面攻略裏安裝kepler插件的時候,提示“Unable to read repository”。
原因:外網的問題?
攻略:https://blog.csdn.net/xiaofanren1111/article/details/80997991(直接做第三步Reload即可,然後再嘗試安裝)
這個問題折騰了很久,終於大功告成:
Step 6. New Server Runtime Environment dialog.
After click “add”, you can see the dialog.
問題四:沒有Tomcat v9.0?
原因:eclipse版本過低,更新的kepler插件版本也低。
解決方案:help裏面check for updates即可。
Step 7. Browse your tomcat installation directory
Step 8. Click Finish and return the preferences dialog
Step 9. Click apply and close
至此,Web課作業的第一階段告一段落。