Java web start - Version problems

大城市里の小女人 提交于 2019-12-25 06:49:27

问题


I've decided to make my app java web start, i prepared the .jar file and .jnlp. Here is .jnlp:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" 
    codebase="http://www.mypage.com/jar/" 
    href="BoxChat.jnlp">
    <information>
        <title>BoxChat</title>
        <vendor>Kitty</vendor>
    </information>
    <resources>
        <!-- Application Resources -->
        <j2se version="1.6+"
              href="http://www.mypage.com/jar/"/>
        <jar href="chat.jar" main="true" />

    </resources>
    <application-desc
         name="BoxChat"
         main-class="chat.class"
         width="320"
         height="240">
     </application-desc>
     <update check="background"/>
</jnlp>

It crashes and says that i have no java 1.6 installed, but im SURE that i have it. What is the problem? Thanks for any replies.


回答1:


Look through the tips in Java Web Start - Runtime Versioning. Look particularly for references to the JNLP Runtime Settings dialog.




回答2:


When you install java usually there are two steps. The first is jdk and when it is finished then it asks you whether you would like to install jre. And webstart requires JRE installed correctly. So I would simply sujest to install it again and make sure that you perform the second step (jre).




回答3:


Looks like the problem is with the below line:

<j2se version="1.6+" href="http://www.mypage.com/jar/"/>

You need to specify the vendor url only if you want to request a specific JRE version for example 1.4.2_04. Remove the href attribute and re-try.



来源:https://stackoverflow.com/questions/8932723/java-web-start-version-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!