简体   繁体   English

在Java Applets中嵌入共享库

[英]Embed shared libs in Java Applets

Is it possible to embed linux shared libs (.so) in Java applets? 是否可以在Java小程序中嵌入linux共享库(.so)?

I know that I can call JNI code from applets (privileged only), but is it possible embed these libs inside the applet? 我知道我可以从applet(仅特权)调用JNI代码,但是是否可以将这些lib嵌入applet中?

..is it possible embed these libs inside the applet? ..是否有可能将这些库嵌入到applet中?

No. Natives should be inside the root path of a separate Jar. 否。本地人应位于单独的Jar的根路径内。 There should be separate Jars for OS X, *nix and Windows. 对于OS X,* nix和Windows,应该有单独的Jars。 Then use Java Web Start to deploy the lot and reference each Jar containing natives in an OS specific resource section of the JNLP launch file - so each OS only downloads the type of natives that it requires. 然后,使用Java Web Start部署批次,并在JNLP启动文件的特定于操作系统的resource部分中引用每个包含本机的Jar,因此每个OS仅下载其所需的本机类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM