MikkoP
MikkoP

Reputation: 5092

Starting Java application via web start

I've generated a jnlp file with Netbeans. By double clicking it, I get the following error dialog:

enter image description here

Double clicking the jar works, so no problem there but when double clicking the jnlp file, the antecedent error appears.

The launch.jnlp file looks this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp href="launch.jnlp" spec="1.0+">
    <information>
        <title>...</title>
        <vendor>....</vendor>
        <homepage href=""/>
        <description>...</description>
        <description kind="short">....</description>
        <icon href="icon.png" kind="default"/>
        <offline-allowed/>
    </information>
    <update check="background"/>
    <resources>
        <j2se version="1.6+"/>
        <jar href="File.jar" main="true"/>
        <jar href="lib/itextpdf-5.3.3.jar"/>
    </resources>
    <application-desc main-class="right.path.to.my.main.class.here">
    </application-desc>
</jnlp>

I put the File.jar in the same directory as the jnlp file (all the others are there too).

Upvotes: 1

Views: 1512

Answers (1)

MikkoP
MikkoP

Reputation: 5092

I added codebase attribute to jnlp element, added

<security>
    <all-permissions />
</security>

and signed the application (right click on the project in Netbeans, select Properties and Application -> Web start and sign it there) and now it works.

Upvotes: 2

Related Questions