Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
694 views
in Technique[技术] by (71.8m points)

swing - Java Web Start manifest issue

Im trying to make a swing-app redistributable via java web start. Im building jar and jnlp with netbeans 7.4.

Im getting this message when application is downloaded via web.(Sorry for spanish) But it says that manifest.mf doesn't contain permission attributes.

enter image description here

Im not using a trusted certificated (by CA) i created keystore by my own with netbeans tool.

In project.properties i put

# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed
manifest.custom.codebase=http://150.1.1.32:8084/
# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions)
manifest.custom.permissions=all-permissions
manifest.file=manifest.mf

And when i see after build jar manifest from main jar and all dependencies jar has the attribute all-permissions

Permissions: all-permissions
Created-By: 1.7.0_45-b18 (Oracle Corporation)
Main-Class: com.onix.sirf.gui.executors.SwingExecutor
Codebase: http://150.1.1.32:8084/

This is my jnlp

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="http://150.1.1.32:8084/" href="sirf.jnlp" spec="1.0+">
    <information>
        <title>title</title>
        <vendor>blabla</vendor>
        <homepage href="http://www.blabla.com"/>
        <description>Some description</description>
        <description kind="short">HelloWorld</description>
    </information>
    <update check="always"/>
    <security>
<all-permissions/>
</security>
    <resources>
        <j2se version="1.7+"/>
        <jar href="frontend.jar" main="true"/>
    <jar href="lib/commons-lang3-3.1.jar"/>
<jar href="lib/jcalendar-1.4.jar"/>
<jar href="lib/log4j-1.2.17.jar"/>
<jar href="lib/swingx-all-1.6.4.jar"/>
 -- there are some more libraries
<extension href="jnlpcomponent1.jnlp"/> -- here is one more library sqljdbc4.jar
</resources>
    <application-desc main-class="com.onix.sirf.gui.executors.SwingExecutor">
    </application-desc>
</jnlp>

And jnlpcomponent1.jnlp

<jnlp codebase="http://150.1.1.32:8084/" href="jnlpcomponent1.jnlp" spec="1.0+">
    <information>
        <title>jnlpcomponent1</title>
        <vendor>MSFTSIG</vendor>
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
        <jar href="lib/sqljdbc4.jar" download="eager"/>
    </resources>
    <component-desc/>
</jnlp>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I solved it.

In jnlpcomponent1.jnlp i see that sqljdbc4.jar is already signed by microsoft.

When i was looking to its manifest.mf it hasn't the attribute Permissions: all-permissions. So i delete all manifest file from sqljdbc4.jar and put an empty one (delete MSFTSIG.SF and MSFTSIG.RSA also). Build application again now with my signature and with Permissions: all-permissions in manifest file and works like a charm.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...