在Java中加载远程库
我知道已经有人问过类似的问题,但似乎没有人回答。我正在进行的项目需要这些功能在Java中加载远程库,java,java-native-interface,native,dllimport,loadlibrary,Java,Java Native Interface,Native,Dllimport,Loadlibrary,我知道已经有人问过类似的问题,但似乎没有人回答。我正在进行的项目需要这些功能 dll必须从服务器加载到客户端运行的程序 dll中的本机方法必须访问dll中存在的一组文件 服务器 本机方法的调用发生在客户端 谢谢大家! 你坚持走哪一步,为什么我看不出有问题。我看到了一个需求列表,但仅此而已。 +--------------+ +--------+ | Client (JVM) | - 1. download DLL --> | Server | +
谢谢大家! 你坚持走哪一步,为什么我看不出有问题。我看到了一个需求列表,但仅此而已。
+--------------+ +--------+
| Client (JVM) | - 1. download DLL --> | Server |
+--------------+ +--------+
| | ^ |
| | | |
| | | |
| | +------- 2. DLL-----------------+
| |
| |
| +-- 3. save DLL into temporary location --+
| |
| |
| \ /
| /tmp/some_file
|
|
+--- 4. load file using System.load
To access files on server do one of these (few loose ideas):
- map disk or mount SMB resources
- implement RMI inside native code loaded into JVM via JNI
- implement remote access to files