I am unable to launch "javaws -viewer". I am on "Windows10" and when I type the below command in Run window, I get an error message. Please find the screenshot for the same below.
javaws –viewer
Clicking on Details, I see the following trace. Any help would be appreciated.
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)
Additional Details:
- I have two versions of Java installed on my windows machine (Java8 and Java9). In environment variables, I have set the JAVA_HOME to point to Java8 and the Path is also pointing to "C:\Program Files\Java\jdk1.8.0_162\bin" but somehow I see the Java-9 version in the command prompt result
(Note: Restarted command prompt multiple times after setting the environment variables. Not sure if the original issue is tied up with this one).
>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)