加载.DLL与小程序,并用它在客户端 [英] Load .DLL with applet and use it on client

查看:171
本文介绍了加载.DLL与小程序,并用它在客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以加载的.dll 从服务器到applet中的客户端,然后调用(使用JNI)在客户端加载.dll文件的方法呢?

Can I load .dll from server to client within applet, and then call methods of loaded .dll (using JNI) on client side?

推荐答案

当然可以。小程序将需要由开发人员进行数字签名,以及由最终用户信任(他们点击OK提示时)。把当地人在一个罐子里的根,并将其添加到小程序的运行时类路径,用在归档属性的引用。

Certainly. The applet will need to be digitally signed by the developer, and trusted by the end user (they click 'OK' when prompted). Put the natives in the root of a Jar and add it to the run-time class-path of the applet, using a reference in the archive attribute.

使用使用归档属性部署当地人的小程序的传统方法,每一个客户端获取当地人为Windows,Mac OS X和* nix的缺点。 3倍多的当地人因为他们实际需要。

Using the traditional method of deploying natives to an applet using the archive attribute has the disadvantage that every client gets the natives for Windows, OS X and *nix. 3 times as many natives as they actually need.

最近的能力(Java插件2,Sun的1.6.0_10版引入)是发射使用的 Java Web Start的,然后让我们来划分当地人的下载的​​用户。每个操作系统将只得到当地人的IT需求。

A recent (Java Plug-In 2, introduced in Sun's version 1.6.0_10) ability is to launch embedded applets using Java Web Start, which then allows us to partition the download of natives for the user. Each OS will get only the natives it needs.

..怎样声明Applet类路径?

..how to declare applet class-path?

这是在<指定href=\"http://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html#resources\"相对=nofollow> 资源部分。

例如。从文档。

<resources os="SunOS" arch="sparc">
  <nativelib href="lib/solaris/corelibs.jar"/>
</resources>

与任何资源部分没有操作系统属性将被所有JWS客户端下载,剩下的只有那些匹配。

Any resources section with no os or arch attribute will be downloaded by all JWS clients, the rest only by those that match.

这篇关于加载.DLL与小程序,并用它在客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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