jws application can't load swing-layout

前端 未结 1 1348
广开言路
广开言路 2020-12-22 11:55

I have an old application that use swing-layout and i have to make it usable via java webstart . It runs fine from netbeans but if I launch it using jws I got this error :<

相关标签:
1条回答
  • 2020-12-22 12:19

    The element <eligible> does not appear in the JNLP File Syntax, and your file is malformed as shown. In your previous question on this topic, you mentioned needing to support Java 6. To support Java 5, specify it in <resources>. The JAR containing org.jdesktop.layout.GroupLayout appears correct, but the path is suspicious. Try something like this:

    <resources>
        <j2se version="1.5+" />
        <jar href="lib/swing-layout-1.0.4.jar"/>
    </resources>
    

    Addendum: I don't understand why JWS tries to download the swing-layout.jar from the server.

    The JNLP client downloads all JARs from the server via HTTP. Each JAR must be accessible using the relative path specified in the href attribute. In particular, the directory containing your application JAR and JNLP file must also have a lib directory containing the layout JAR.

    test/
        application.jnlp
        application.jar
        lib/
            swing-layout-1.0.4.jar
    
    
    0 讨论(0)
提交回复
热议问题