[英]Deploy Java Web Applet with Third Party Dependencies
I have made a Java Applet that depends on some third party libriaries as well as a DLL that is called via JNI. 我制作了一个Java Applet,它依赖于某些第三方库以及通过JNI调用的DLL。 These will obviously not be installed on clients computers.
这些显然不会安装在客户端计算机上。 Is there anyway to package these third party libriaries and external DLLs within my Applet's JAR so that it can be run by any client with a base Java install?
无论如何,我的Applet JAR中是否打包了这些第三方库和外部DLL,以便任何安装了基本Java的客户端都可以运行它?
Using JNI within a web application is a recipe for heartburn, particularly in Windows. 在Web应用程序中使用JNI是导致胃灼热的秘诀,尤其是在Windows中。
java.library.path
is setup correctly, which is usually done by settings in the application server rather than something deployable in the WAR file. java.library.path
,这通常是通过应用程序服务器中的设置完成的,而不是通过WAR文件中可部署的设置完成的。 Is there anyway to package these third party libriaries
反正有打包这些第三方库的东西吗
In Eclipse, under the Java project properties (right click), I can do a: 在Eclipse中,在Java项目属性(右键单击)下,我可以执行以下操作:
Export... => Export as Runnable JAR
Then I tell it to pack my jar dependencies into that exported JAR. 然后,我告诉它把我的jar依赖关系打包到导出的JAR中。 The exported JAR will have all its dependencies packed into it.
导出的JAR将打包所有依赖项。
alt text http://www.ubuntu-pics.de/bild/97131/selection_016_mg6IDm.png 替代文字http://www.ubuntu-pics.de/bild/97131/selection_016_mg6IDm.png
I am no expert on the topic, but there are working solutions to all these problems. 我不是该主题的专家,但是对于所有这些问题都有可行的解决方案。 They might give you a headache, but some things can only be done this ways (and I am quite sure that your problem with the Entrust CSP is one of those).
它们可能使您头疼,但是有些事情只能通过这种方式来完成(我非常确定,Entrust CSP的问题就是其中之一)。
You can take a look at OpenSign from the OpenOCES-project . 您可以从OpenOCES-project看一下OpenSign 。 The magic happens in org.openoces.opensign.client.applet.bootstrap.
魔术发生在org.openoces.opensign.client.applet.bootstrap中。
I also believe that JNLPAppletLauncher solves the same problem, but I have no experience with i. 我也相信JNLPAppletLauncher可以解决相同的问题,但是我对i没有任何经验。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.