使用JNLP启动具有Java3D依赖项的小程序出现问题

5
作为标题所说,我目前正在尝试使用JNLP来启动一个带有Java3D依赖项的小程序,以供可能没有安装Jave3D的用户使用。不幸的是,出现了一个错误,与'subapplet.classname'值未被找到有关,同时小程序尝试启动...
这个问题加剧了java.net网站FourByFour演示中提供的示例无法工作并且出现了同样的类找不到的问题。
Java JNLP包含Four by Four Demo的网页: java.net FourByFour Demo 已经尝试了Firefox和IE浏览器,但没有任何区别...
java.net网站上使用的代码示例:
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
        width=800 height=400
        archive="http://download.java.net/media/java3d/webstart/test/j3d-examples.jar,
                 http://download.java.net/media/applet-launcher/applet-launcher.jar,
                 http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dcore.jar,
                 http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dutils.jar,
                 http://download.java.net/media/java3d/webstart/release/vecmath/latest/vecmath.jar,
                 http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
                 http://download.java.net/media/gluegen/webstart/gluegen-rt.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="org.jdesktop.j3d.examples.four_by_four.FourByFour">
    <param name="subapplet.displayname" value="Java 3D Four by Four Applet">
    <param name="jnlpNumExtensions" value="1">
    <param name="jnlpExtension1" value="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp">
    <param name="progressbar" value="true">
    <param name="noddraw.check" value="true">
</applet>
1个回答

11
The Java 3D applet示例仍使用'org.jdesktop.applet.util.JNLPAppletLauncher'。自JRE版本1.6.0_21-b07以来,此启动器无法正常工作并且不再维护。
按照“Java教程:使用Applet标记部署”( h ttp://download-llnw.oracle.com/javase/tutorial/deployment/applet/html.html),我切换到了applet标记和相应的jnlp文件。这需要JRE 6u10+。以下示例是实时的,并可以从此处启动: 包括Java 3D加载的Applet
<applet codebase="webstart/" width="1200" height="800" align="middle">
 <param name="jnlp_href" value="propellerUniverseAPP1.0_J3D.jnlp">
</applet>

JNLP

:JNLP
<?xml version="1.0" encoding="UTF-8"?>
<!-- InteractiveMesh.org TestSpace PropellerUniverse 1.0 Applet J3D -->

<jnlp spec="1.0+" codebase="http://www.interactivemesh.org/testspace/webstart/" 
    href="propellerUniverseAPP1.0_J3D.jnlp">
    <information>
        <title>PropellerUniverse 1.0</title>
        <vendor>InteractiveMesh</vendor>
        <homepage href="http://www.interactivemesh.org/index.html"/>
        <description>PropellerUniverse 1.0</description>
        <!-- icon href=""/ -->
    </information>

    <security> </security>

    <update check="always" policy="always"/>

    <resources>
        <j2se version="1.6+"/>
        <extension href="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp"/>
        <jar href="propellerUniverse1.0.jar" main="true"/>
        <jar href="jim_j3d-vrml97_v2.1.jar"/>
        <jar href="orbitbehaviorinterim2.1.jar"/>
        <property name="sun.awt.noerasebackground" value="true"/>  
        <property name="sun.awt.erasebackgroundonresize" value="true"/>  
        <property name="sun.java2d.noddraw" value="true"/>  
    </resources>
    <applet-desc  main-class="com.interactivemesh.j3d.testspace.canvas3d.PropellerUniverseJApplet"
                  width="1200" height="800" name="PropellerUniverse">
    </applet-desc>
</jnlp>

另请参阅:


嗨@InteractiveMesh,当我尝试您提供的URL时,它可以正常工作。但是,当我拿了您的JNLP文件并进行了一些修改以使我的应用程序工作时,我收到了一个错误,说java3D jar文件没有签名。您是如何解决这个问题的?(我禁用了Java临时文件,也不起作用) - sirus

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接