空指针异常:在 Solaris 11.3 上安装 glassfish4

空指针异常:在 Solaris 11.3 上安装 glassfish4

glassfish-4.0-unix.sh我正在尝试使用file在 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版本:

#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/[email protected],5.11:20150812T161224Z

答案1

更新:

看起来问题实际上是使用 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。更多信息这里是认证矩阵

相关内容