简体   繁体   English

使用JNLP启动具有Java3D依赖项的applet的问题

[英]Problem using JNLP to launch applet with Java3D dependencies

As title says currently trying to use JNLP as a means of launching an applet with Java3D dependenices for any user who may not have Jave3D installed on their system. 正如标题所说,目前正试图使用​​JNLP作为一种方法,为任何可能没有在其系统上安装Jave3D的用户启动带有Java3D依赖项的applet。 Unfortunately getting an error to do with the 'subapplet.classname' value not being found, while the applet tries to launch.. 不幸的是,当applet尝试启动时,找不到与'subapplet.classname'值有关的错误。

This problem is compounded by the fact that the example supplied on the java.net website FourByFour Demo isn't working and fails with the same problem of class not found. java.net网站上提供的示例FourByFour Demo无法正常工作,并且因找不到类相同的问题而失败,这个问题更加复杂。

Java JNLP webpage with Four by Four Demo: Java JNLP网页,有四个四个演示:

java.net FourByFour Demo java.net FourByFour演示

Have tried with both Firefox & IE browsers with no difference.. 尝试过使用Firefox和IE浏览器没有区别。

Sample of the code used on the java.net website: 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>

the Java 3D applet examples still use the 'org.jdesktop.applet.util.JNLPAppletLauncher'. Java 3D applet示例仍然使用'org.jdesktop.applet.util.JNLPAppletLauncher'。 Since JRE-Version 1.6.0_21-b07 this launcher doesn't work properly and is no longer maintained. 自JRE-Version 1.6.0_21-b07以来,此启动器无法正常工作且不再维护。

Following the 'The Java Tutorial : Deploying With the Applet Tag' h ttp://download-llnw.oracle.com/javase/tutorial/deployment/applet/html.html I switched to the applet-tag and a corresponding jnlp-file on my webpages. 遵循'Java教程:使用Applet标记进行部署'h ttp://download-llnw.oracle.com/javase/tutorial/deployment/applet/html.html我切换到applet-tag和相应的jnlp文件在我的网页上。 This requires JRE 6u10+. 这需要JRE 6u10 +。 The following sample is live and can be launched from here: 以下示例是实时的,可以从这里启动:

Applet incl. Applet包含 loading of Java 3D 加载Java 3D

<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>

See also: 也可以看看:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM