Java Web Start learning

Source: Internet
Author: User
After reading swing's Java Web Start learning, I wrote a Java application, so I decided to put my application on the server and use the Java Web Start technology to make it easier for others to use.

1. keystore Validity PeriodKeytool-genkey-keystore mykeystore-alias same stest-validity 365

Set with-validity valdays. The default value is 6 months.

2. Sign JAR FileJarsigner-keystore mykeystore-storepass XXXX yourtest. Jar using stest

Directly use storepass to pass the password to jarsigner. You do not need to enter the password separately each time. It is suitable for batch processing. Sign multiple jar files together. Because JWS is used, sign is required for referenced jar files.

3. referenced jar that has been signed by someone else
Exception may occur if no special processing is performed.Jar resources in JNLP file are not signed by same certificate

Run the-verfiy command to verify that the jar has been signed.Jarsigner-Certs-verbose-verify yourtest. Jar

Generally, the solution is to write the signed JAR into a separate JNLP, and then reference it in the primary JNLP. <? XML version = "1.0" encoding = "UTF-8"?>
<JNLP spec = "1.0 +" codebase = "http: // localhost: 8080/WebStart/" href = "signedjar. JNLP">
<Information>
<Title> signed JAR </title>
<Vendor> ABC Company </vendor>
<Offline-allowed/>
</Information>
<Offline-allowed/>
<Resources>
<Jar href = "signed. Jar"/>
</Resources>
<Component-Desc/>
</JNLP>

<Resources>
<J2se version = "1.5 +"/>
<Jar href = "jaxbw. Jar"/>
<Jar href = "substance. Jar"/>
<Jar href = "jaxb-api.jar"/>
<Jar href = "jaxb-impl.jar"/>
<Jar href = "jaxb-xjc.jar"/>
<Jar href = "jsr173_api.jar"/>
<Extension name = "signedjar" href = "signedjar. JNLP"/>
</Resources>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.