代码之家  ›  专栏  ›  技术社区  ›  thomas.fogh

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

  •  0
  • thomas.fogh  · 技术社区  · 11 年前

    我有一个使用httpd在Linux PC上运行的Java小程序,它运行得很好,但当我将小程序移动到我们公司的服务器时,在我允许浏览器运行Java之后,什么都不会发生。

    索引.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 回复  |  直到 11 年前
        1
  •  0
  •   thomas.fogh    11 年前

    jnlp文件在web服务器上没有prober MIME类型。。。