VSCode 開發 JAVA
微軟為 Java 開發者推出了一個 Visual Studio Code 的安裝程序。Visual Studio Code 中目前提供了許多 Java 擴展。
該軟件包可直接安裝或作為現有環境的更新,以將 Java 或 Visual Studio Code 添加到開發環境中。下載並打開后,它會傻瓜式地自動檢測系統中是否擁有本地開發環境中的基本組件,包括 JDK、Visual Studio Code 和基本 Java 擴展。完成后,就可以直接打開 Visual Studio Code 並開始編寫和運行 Java 代碼。
1、一鍵安裝環境及擴展
So today, we’re releasing a special Installer of Visual Studio Code for Java developers. The package can be used as a clean install or an update for existing environment to add Java or Visual Studio Code to your development environment. Once downloaded and opened, it automatically detects if you have the fundamental components in your local development environment, including the JDK, Visual Studio Code and essential Java extensions.
等待安裝成功:
2、VSCode 開發項目
上邊我們通過一鍵安裝,不僅把系統環境變量和 JDK 都安裝好了,某些 VSCode 中的依賴也一並安裝成功,我們現在就直接進行開發:
1、新建項目根目錄文件夾;
2、新建 .java 測試文件;
3、書寫代碼,並 Run 執行輸出;
4、斷點調試;