Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>
like image 367
emi-le Avatar asked Nov 29 '25 14:11

emi-le


2 Answers

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!

like image 184
emi-le Avatar answered Dec 01 '25 05:12

emi-le


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, i.e. 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.

like image 39
jan Avatar answered Dec 01 '25 04:12

jan