Java applet在本地测试服务器上加载,但不在生产中加载

时间:2013-04-08 09:30:43

标签: java html applet jnlp

我使用httpd在我的Linux PC上运行了一个Java小程序,它工作正常,但是当我将applet移动到我们公司服务器后,在我允许浏览器运行Java之后没有任何反应。

的index.html:

<html>
    <head>
        <title>KIRK Handset Software Updater</title>
    </head>
    <body>
        <img alt="KIRK Handset Software Updater" src="KIRKHandsetSoftwareUpdater_banner.png">
        <br />
        <script src="http://www.java.com/js/deployJava.js"></script>

        <script> 
            var attributes = {
                codebase: 'http://xxxx.com/software/dect/JavaLoader',
                code: 'FlashLoader.class', archive: 'FlashLoader.jar',
                width: 500, height: 500, id: 'KIRK Handset Software Updater' }; 
            var parameters = { jnlp_href: 'jsflashloader-applet.jnlp' }; 
            deployJava.runApplet(attributes, parameters, '1.5'); 
        </script>

        <br />
    </body>
</html>

在Linux PC上运行时的Java控制台输出:

Match: beginTraversal
Match: digest selected JREDesc: JREDesc[version 1.5+, heap=-1--1, args=null, href=null, sel=false, null, null], JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_17
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files (x86)\Java\jre7\bin\javaw.exe
    args is: null
    native platform is: Windows, x86 [ x86, 32bit ]
    JavaFX runtime is: JavaFX 2.2.7 found at C:\Program Files (x86)\Java\jre7\
    enabled is: true
    registered is: true
    system is: true

    Match: ignoring maxHeap: -1
    Match: ignoring InitHeap: -1
    Match: digesting vmargs: null
    Match: digested vmargs: [JVMParameters: isSecure: true, args: ]
    Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ]
    Match: digest LaunchDesc: http://172.29.140.8/javaflashloader/jsflashloader-applet.jnlp
    Match: digest properties: []
    Match: JVM args: [JVMParameters: isSecure: true, args: ]
    Match: endTraversal ..
    Match: JVM args final: 
    Match: Running JREInfo Version    match: 1.7.0.17 == 1.7.0.17
     Match: Running JVM args match: have:<>  satisfy want:<>
os: Windows 7, arch: x86
WARNING:  RXTX Version mismatch
    Jar version = RXTX-2.2pre1
    native lib Version = RXTX-2.2pre2
Worker thread started...

在公司网站上运行时,Java控制台完全为空。

编辑:由于jnlp没有加载我没有包含它,但是这里是:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" 
      href="jsflashloader-applet.jnlp">
    <information>
        <title>KIRK Handset Software Updater</title>
        <homepage href="index.html"/>
        <description>Software Updater for KIRK 50-,60-,70- and Butterfly-Handset Series</description>
        <shortcut>
            <desktop/>
            <menu submenu="VARS"/>
        </shortcut>
    </information>
    <!-- update check="background" --> 
    <security>
        <all-permissions/>
    </security>
    <resources>
        <j2se version="1.5+" />
        <jar href="FlashLoader.jar" main="true" />
        <jar href="RXTXcomm.jar" />
    </resources>
    <resources os="Mac OS X">
        <nativelib href="rxtx-native-macosx.jar" />
    </resources>
    <resources os="Linux">
        <nativelib href="rxtx-native-linux.jar"/>
    </resources>
    <resources os="Windows" arch="x86_64">
        <nativelib href="rxtx-native-windows64.jar"/>
    </resources>
    <resources os="Windows" arch="x86">
        <nativelib href="rxtx-native-windows32.jar"/>
    </resources>
    <resources os="Windows" arch="amd64">
        <nativelib href="rxtx-native-windows64.jar"/>
    </resources>
    <applet-desc name="KIRK Handset Software Updater Applet" main-class="FlashLoader" width="500" height="500"></applet-desc>
</jnlp>

1 个答案:

答案 0 :(得分:0)

jnlp文件在Web服务器上没有prober MIME类型...