pjp*_*pjp 6 jnlp tibco java-web-start
我正在尝试使用Java Webstart部署一个通过TibrvJ库使用Tibrv 的本机实现的应用程序.
我已经将所有Windows dll从内部打包c:\tibco\tibrv\bin到一个Jar文件中,并将它们添加到JNLP文件中的nativelib元素中.
我希望webstart 从文件中获取dlltibco-7.5.1-nativelibs.jar文件并允许它们通过System.loadLibrary调用 来加载Tibrv.open().但是它似乎不想正常工作.
我的JNLP文件如下所示:
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
<jnlp spec="6.0+"
codebase="http://somewhere:8080/my-gui/application"
href="launch.jnlp">
<information>
<title>My GUI</title>
<vendor>Technology</vendor>
<description>Dashboard</description>
<description kind="short">Dashboard</description>
<icon href="icon/Stocks-128x128.png" />
<offline-allowed />
<shortcut online="true">
<desktop />
<menu submenu="Dashboard" />
</shortcut>
</information>
<security>
<all-permissions />
</security>
<update check="always" policy="prompt-update" />
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"
java-vm-args="-Xmx120M -ea />
<property name="log4j.configuration" value="live/log4j.xml" />
<property name="swing.aatext" value="true" />
<jar href="tibrvj-7.5.1.jar" />
<jar href="dashboard-gui.jar" main="true" />
</resources>
<resources>
<nativelib href="nativelib/tibco-7.5.1-nativelibs.jar" />
</resources>
<application-desc main-class="com.somewhere.Main">
<argument>classpath:/live/client.xml</argument>
<argument>/live/live.properties</argument>
</application-desc>
</jnlp>
Run Code Online (Sandbox Code Playgroud)
应用程序启动但是一旦调用打开tib,它就会崩溃,并出现以下错误:
[根异常是TibrvException [error = 22,message =版本不匹配:libtibrv版本7.4与tibrvj共享库7.5的版本不匹配]]
TibrvException [error = 901,message =找不到库:tibrvj]]
用户已经在他们的PC上安装了各种 Tib,从Tib 7.2到7.5.Webstart应用程序仅在安装了7.5的计算机上正常工作,该计算机与程序包内的Jar文件匹配.所以它似乎没有对nativelib jar做任何事情.
我想避免为用户安装的不同版本的Tib部署3个版本的Web启动应用程序.
有没有其他人设法让TibrvJ和Webstart的组合工作?
我设法让它运作起来.问题是,System.loadLibrary使用Webstart时的调用不会加载到指定库的依赖项中,即使它们已被打包到nativelib jar中.
有关详细信息,请参阅http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6191612.
要解决此问题,必须以正确的顺序明确加载所有依赖项.还需要将每个dll库放入自己的jar文件中.
因此,要使用本机TibrvJ,您需要在调用之前进行以下调用Tibrv.Open.
System.loadLibrary("msvcr71");
System.loadLibrary("tibrv");
System.loadLibrary("tibrvcm");
System.loadLibrary("tibrvft");
System.loadLibrary("tibrvcmq");
System.loadLibrary("tibrvj");
Run Code Online (Sandbox Code Playgroud)
快乐的时光!
| 归档时间: |
|
| 查看次数: |
4871 次 |
| 最近记录: |