Apache NetBeans是一個免費的開源IDE(Java、PHP、HTML5、JavaScript集成開發環境,您也可以通過插件使用其他語言如C、C++、Groovy等。您還可以擴展功能。Apache NetBeans 在 Windows、macOS、Linux 和 Solaris 上運行,並在 Apache License 2.0 下獲得許可。

在 Apache Ubuntu 上安裝 NetBeans

您需要 JDK 8 或 JDK 11 才能在系統上安裝和運行最新版本的 Apache NetBeans,或者最新的 JDK 16(當前 JDK 版本)。您可以通過運行此命令來檢查已安裝的 Java 版本。

java -version

如果您沒有 Java,請使用以下命令安裝它。

sudo apt update
sudo apt install default-jdk

如果需要,在安裝過程中輸入 Ubuntu 用戶密碼。

下載 Apache Netbeans

從上面的下載鏈接下載最新版本的 .sh 文件格式的 Apache NetBeans 安裝程序腳本並將其保存到。 下載 文件夾。

示例:Apache-NetBeans-12.4-bin-linux-x64.sh (SHA-512, PGP ASC) 只需單擊鏈接。

NetBeans 安裝程序鏈接

這裡,“Apache-NetBeans-12.4-bin-linux-x64.sh”是當前版本的文件名。根據版本的不同,它看起來不同。

將打開一個新頁面。在這裡,您可以右鍵單擊 NetBeans 安裝程序腳本,然後選擇將鏈接另存為並將其保存到的選項。 下載 文件夾。下載的文件大小約為 450MB。

如何在 Ubuntu 上安裝 Thonny Python IDE

下載 NetBeans 安裝程序

然後使用終端進入下載文件夾

cd Downloads

然後運行此命令以允許 Apache 運行 NetBeans 安裝程序。

sudo chmod +x Apache-NetBeans-12.4-bin-linux-x64.sh

這裡”Apache-NetBeans-12.4-bin-linux-x64.sh是下載的安裝程序的名稱。您可以根據下載的安裝程序名稱更改上述命令。然後執行以下命令。

sudo ./Apache-NetBeans-12.4-bin-linux-x64.sh

GUIApacheNetBeans 安裝程序窗口打開。下一個,[次へ]單擊開始並完成安裝。安裝完成需要一些時間。

Apache NetBeans 安裝程序 GUI

Apache NetBeans 安裝程序完成

Apache NetBeans 項目

通過 Snap 安裝 Apache NetBeans。

您還可以通過 snap 從 snap 商店安裝 Apache NetBeans。打開終端 (ctrl + alt + t) 並運行以下 Apache NetBeans snap install 命令。

sudo snap install netbeans --classic

通過 Flatpak 安裝 Apache NetBeans。

安裝 flatpak 和 flathub 並重新啟動系統。然後運行以下 Apache NetBeans flatpak 安裝命令。

flatpak install flathub org.apache.netbeans

你可以通過

flatpak run org.apache.netbeans

如果您願意,也可以從下面的下載鏈接安裝插件。
Apache NetBeans 插件

而已。