我无法启动“ javaws -viewer ”。我在“ Windows10 ”上,当我在“运行”窗口中键入以下命令时,我收到一条错误消息。请在下面找到相同的屏幕截图。
javaws –viewer
单击Details,我看到以下跟踪。任何帮助,将不胜感激。
java.io.FileNotFoundException: –viewer (The system cannot find the file specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at jdk.javaws@9.0.4/com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at jdk.javaws@9.0.4/com.sun.javaws.Main.prepareLaunchDesc(Unknown Source)
at jdk.plugin@9.0.4/sun.plugin2.main.WebStart.launchApp(Unknown Source)
at jdk.plugin@9.0.4/sun.plugin2.main.WebStart.continueInSecureThread(Unknown Source)
at jdk.plugin@9.0.4/sun.plugin2.main.WebStart.access$000(Unknown Source)
at jdk.plugin@9.0.4/sun.plugin2.main.WebStart$1.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
额外细节:
- 我的 Windows 机器上安装了两个版本的 Java(Java8 和 Java9)。在环境变量中,我将JAVA_HOME 设置为指向 Java8 并且路径也指向“ C:\Program Files\Java\jdk1.8.0_162\bin ”但不知何故我在命令提示符结果中看到了 Java-9 版本
(注意:设置环境变量后多次重新启动命令提示符。不确定原始问题是否与此问题有关)。
>java -version java version "9.0.4" Java(TM) SE Runtime Environment (build 9.0.4+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)