在終端cd到netbeans下載放置的目錄,輸入./netbeans-6.1-javaee-linux.sh,出現了找不到jdk錯誤信息:
Configuring installer...
Search JVM on the system...
Java SE Development Kit (JDK) was not found on this computer
JDK 6 or JDK 5 is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again.
You can specify valid JDK location using --javahome installer argument.
To download the JDK, visit http//java.sun.com/javase/downloads
在Ubuntu下已經安裝了JDK5和JDK6,怎麼會一個都找不到,難道是兩者同時安裝了對netbeans有沖突,使得netbeans一個都找不到,或不知道使用哪一個jdk。
幸好提示信息裡有個使用 --javahome 安裝參數指定JDK安裝位置
接著在終端輸入 ./netbeans-6.1-javaee-linux.sh --javahome /usr/lib/j2sdk1.6-sun
Configuring installer...
Search JVM on the system...
Extracting installation data...
Running installer wizard...
安裝向導窗口正常跳出。