如何使用jnlp 32位和64位正确地部署桌面JavaFx 2.0应用程序? [英] How to deploy a desktop JavaFx 2.0 application correctly using jnlp for 32 and 64 bit?

查看:223
本文介绍了如何使用jnlp 32位和64位正确地部署桌面JavaFx 2.0应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于部署我的javafx 2.0应用程序的jnlp文件,但是如何确保用户具有正确的javafx运行时(32或64位,具体取决于机器上存在的jvm),如果没有,请下载它并运行应用程序。

I have a jnlp file for deploying my javafx 2.0 application, however, how do I make sure that the users have the correct javafx runtime (32 or 64 bit depending on the jvm present on the machine) and if not, download it and run the application.

假设用户当前没有安装javafx运行时,我面临的问题主要是使用64位机器,位,64位或两者JRE的是:

Assuming that the user does not have a javafx runtime currently installed, the problems that I'm facing mostly with a 64 bit machine with either 32-bit, 64-bit or both JRE's are:

1)Javafx swing部署指南提到使用< jfx:javafx-runtime版本/> 标签来下载适当的jfx运行时,但JRE低于1.7不了解此标签/命名空间。

1) The Javafx swing deployment guide mentions to use the <jfx:javafx-runtime version /> tag to download the appropriate jfx runtime, but JRE below 1.7 doesn't understand this tag/namespace.

2)如果32位jre安装在64位机器上,然后如何将我的应用程序安装到Program Files(x86)文件夹中,下载并使用32位javafx运行时。

2) If a 32-bit jre is installed on a 64-bit machine, then how do I install my application to the "Program Files(x86)" folder, download and use 32-bit javafx runtime.

3)如果在64位机器上安装了64位jre,那么如何将我的应用程序安装到Program Files文件夹,d自己负责并使用64位javafx运行时。

3) If a 64-bit jre is installed on a 64-bit machine, then how do I install my application to the "Program Files" folder, download and use 64-bit javafx runtime.

这是我的jnlp文件目前的样子:

Here is how my jnlp file looks currently:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file:///C%3A/Program%20Files/HP/Pulse/PulseLite"href="iMonLauncher.jnlp">
    <information>      
        <title>iMonLauncher</title>  
        <vendor>Administrator</vendor>   
        <homepage href="file:///C%3A/Program%20Files/HP/Pulse/PulseLite"/>     
        <description>iMonLauncher</description>  
        <offline-allowed/>    
    </information>   
    <security>      
        <all-permissions/>  
    </security> 
    <resources> 
        <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
        <jar href="iMon.jar" size="428419"/>         
         <jar href="lib/ibase-core.jar" size="197029"/>
         <jar href="lib/ibase-fx.jar" size="210175"/>
         <jar href="lib/imonDB.jar" main="true" size="156616"/>
         <jar href="lib/imon-service.jar" main="true" size="73190"/>
         </resources>
     <application-desc name="iMon" main-class="imon.Main" >
     </application-desc>
     <update check="always"/>

代码库自动更改为指向正确的程序文件文件夹取决于架构。

The codebase changes automatically, to point to the correct program files folder depending on the architecture.

提前感谢

推荐答案

你错过了你的jnlp中的xmlns:jfx命名空间。它应以

You miss xmlns:jfx namespace in your jnlp. It should starts with

<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="iMonLauncher.jnlp">

一旦用户安装了常规的Java并点击了这样的jnlp文件,他将会显示自动下载消息FX。它会发现使用哪个Java,下载并安装javafx版本。

Once user has regular java installed and clicked on such jnlp file he would be presented with automatic download message for FX. It will find out which java is used, download and install approprivate javafx version.

这篇关于如何使用jnlp 32位和64位正确地部署桌面JavaFx 2.0应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆