简体   繁体   中英

My java web start application only starts when verbose is set

I have a java web start application, that I try to start via

javaws.exe https://localhost:8888/myApplication/myApplication.jnlp

nothing happens (no error message; I see no process starting in the task list).

If I start it via

javaws.exe -verbose https://localhost:8888/myApplication/myApplication.jnlp

the application starts.

I can also start the application when using

javaws.exe -viewer https://localhost:8888/myApplication/myApplication.jnlp

and then starting the application from the java cache viewer .

What is the difference, that might trigger the application to run, when in verbose mode or via the viewer? Here is my jnlp file:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="https://localhost:8888/myApplication" href="myApplication.jnlp">
    <information>
        ....
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
        <j2se version="1.8.0_60+"         href="http://java.sun.com/products/autodl/j2se"          max-heap-size="500m" initial-heap-size="250m"/>
        <!-- some jars are referenced -->
        <property name="sun.java2d.d3d" value="false" />
    </resources>
    <resources os="Windows">
        <nativelib href="mylib.jar" download="eager" />
    </resources>
    <application-desc main-class="myClass">
        <argument>-initLogging</argument>
        <argument>SETPROPERTYjavax.net.ssl.trustStore</argument>
        <argument>_UNDEFINED_</argument>
        <argument>SETPROPERTYjavax.net.ssl.trustStoreType</argument>
        <argument>_UNDEFINED_</argument>
        <argument>SETPROPERTYjavax.net.ssl.trustStorePassword</argument>
        <argument>_UNDEFINED_</argument>
        <argument>-locale</argument>
        <argument>_UNDEFINED_</argument>
        <argument>-serviceHost</argument>
        <argument>_UNDEFINED_</argument>
        <argument>-serviceProtocol</argument>
        <argument>_UNDEFINED_</argument>
        <argument>-servicePort</argument>
        <argument>_UNDEFINED_</argument>
        <argument>-trustStrategy</argument>
        <argument>_UNDEFINED_</argument>
    </application-desc>
</jnlp>

I activated the trace and log output and found an Exception occured:

java.io.FileNotFoundException: C:\ProgramData\Oracle\Java\java.settings.cfg (Das System kann den angegebenen Pfad nicht finden)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileReader.<init>(FileReader.java:72)
    at com.sun.deploy.config.WinPlatform.readSystemConfig(Unknown Source)
    at com.sun.deploy.config.WinPlatform.getSponsorOffersDisabledSettings(Unknown Source)
    at com.sun.deploy.config.ClientConfig.getSponsorOffersDisabledSettings(Unknown Source)
    at com.sun.deploy.panel.AdvancedProperties.saveSponsorOfferingSettings(Unknown Source)
    at com.sun.deploy.panel.ControlPanel.apply(Unknown Source)
    at com.sun.deploy.panel.ControlPanel.<init>(Unknown Source)
    at com.sun.deploy.panel.ControlPanel.main(Unknown Source)
    at com.sun.javaws.Main.launchJavaControlPanel(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)

Then I found this page: https://bugs.openjdk.java.net/browse/JDK-8134475

When I activate the java browser content (Java Control Panel > Security Tab > select checkbox "Enable content for browser and Web Start application"). Then the application started...

But the problem is: I do not know why!

I had the problem, too (see my comment My java web start application only starts when verbose is set )

I solved this problem by updating Java, ie reinstalling Java. The file C:\\ProgramData\\Oracle\\Java\\java.settings.cfg was created again and this new java installation could open web start applications again correctly. Although older versions still had the same bug.

在使用Java 9更新Java之后,我需要在Java控制面板的安全选项卡中“在浏览器中启用Applet和Web Start”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM