Software-Installation
空指針異常:在 Solaris 11.3 上安裝 glassfish4
我正在嘗試使用
glassfish-4.0-unix.sh
文件在 Solaris 11.3 機器上安裝 glassfish4。命令後
sh ./glassfish-4.0-unix.sh
圖形安裝程序啟動。然後在 JDK 選擇頁面 - 沒有可供選擇的 JDK 選項,它會在終端視窗中列印錯誤:// Error: Exception in runnable:Method Invocation theJava.getInstalledJDKDetails : at Line: 99 : in file: inline evaluation of: `` import java.io.File; import java.util.List; import java.util.ArrayList; . . . '' : theJava .getInstalledJDKDetails ( ) Called from method: run : at Line: -1 : in file: <Called from Java Code> : <Compiled Java Code> Target exception: java.lang.NullPointerException
這裡可能有什麼問題?
也無法手動輸入 JDK 位置。
JAVA_HOME
設定為:#echo $JAVA_HOME /usr/jdk/jdk1.8.0_60
爪哇版:
#java -version java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode) #pkg info jdk-8 Name: developer/java/jdk-8 Summary: Java Platform Standard Edition Development Kit (1.8.0_60-b27) Description: The Java Platform Standard Edition Development Kit (JDK) includes both the runtime environment (Java virtual machine, the Java platform classes and supporting files) and development tools (compilers, debuggers, tool libraries and other tools). The JDK is a development environment for building applications, applets and components that can be deployed with the Java Platform Standard Edition Runtime Environment. Category: Development/Java State: Installed Publisher: solaris Version: 1.8.0.60.27 Build Release: 5.11 Branch: None Packaging Date: August 12, 2015 04:12:24 PM Size: 96.23 MB FMRI: pkg://solaris/developer/java/jdk-8@1.8.0.60.27,5.11:20150812T161224Z
更新:
似乎問題實際上在於使用 JDK8 執行的安裝程序。我所做的步驟是:
pkg install jdk-7 export JAVA_HOME=/usr/jdk/instances/jdk1.7.0_ ./glassfish-4.0-unix.sh
在此之後,我能夠選擇 SDK。請注意,在 Glassfish 4.0 的發布節點中,不支持 JDK 8。更多資訊請參見認證矩陣