Some libraries don't work when running JNLP file

ⅰ亾dé卋堺 提交于 2019-12-11 07:13:22

问题


Everything works in my Java EE project when I'm running it from Netbeans, but when I deploy it in Glassfish server and run downloaded JNLP file, some added libraries don't work.

Any ideas?


回答1:


Any library that your program needs that is not part of the standard Java SE distribution must be referenced in the JNLP file. Part of your JNLP file might be:

<resources>
   <j2se version="1.6+"/>
   <jar href="serdarsProject.jar" main="true"/>
   <jar href="lib/activation.jar"/>
   <jar href="lib/mail.jar"/>
   <jar href="lib/jcommon-1.0.16.jar"/>
   <jar href="lib/log4j-1.2.jar"/>
</resources>

Since mail.jar and activation.jar are included with Java EE, you would not need these in your library when running a Java EE project in netbeans.

Turn on the Java Console in your preferences. In Windows, you can do this through the Control Panel - the option is found in the Java Control Panel. When some function in your program fails to work, you will probably see a specific error message in the output window. This might help you determine which jar libraries you need to include.



来源:https://stackoverflow.com/questions/9376860/some-libraries-dont-work-when-running-jnlp-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!