Karthick
Karthick

Reputation: 13

Unable to launch application "javaws"

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

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 [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)

Additional Details:

(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)

Upvotes: 0

Views: 4910

Answers (1)

DrHopfen
DrHopfen

Reputation: 837

The oracle installer puts a directory (C:\ProgramData\Oracle\Java\javapath) with links to the installation in front of the path. Check your path variable and check whether you have multiple java executables on the path with "where java".

Upvotes: 1

Related Questions