我无法启动“ javaws -viewer”。我在“ Windows10”上,在“运行”窗口中键入以下命令时,出现错误消息。请在下面找到相同的屏幕截图。
javaws –viewer
javaws viewer
单击详细信息,我看到以下跟踪。任何帮助,将不胜感激。
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 [email protected]/com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at [email protected]/com.sun.javaws.Main.prepareLaunchDesc(Unknown Source)
at [email protected]/sun.plugin2.main.WebStart.launchApp(Unknown Source)
at [email protected]/sun.plugin2.main.WebStart.continueInSecureThread(Unknown Source)
at [email protected]/sun.plugin2.main.WebStart.access$000(Unknown Source)
at [email protected]/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)
最佳答案
oracle安装程序将目录(C:\ ProgramData \ Oracle \ Java \ javapath)放在路径前面,并带有指向安装的链接。检查您的路径变量,并使用“ where java”检查路径上是否有多个Java可执行文件。
关于java - 无法启动应用程序“javaws”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48947901/