Where to put external libs in Glassfish

拈花ヽ惹草 提交于 2019-11-30 19:07:15

I think I can answer the question myself now: domain1/lib seems to be the right place to put all those jar files. At least it works perfectly on the 2 Linux boxes I tried and on my Mac. I also found out why it didnt work the same on my Windows 7 laptop. The domain path is user specific if you use the Glassfish install that comes with Netbeans, that means you have to put the jar files under

C:\Users\`username`\.netbeans\7.0\config\GF3\domain1\lib

to work as expectd, jars under

C:\Program Files\glassfish-3.1\glassfish\domain\domain1\lib

on the other hand seem to be ignored by the classloader.

The only directory that is part of the classpath is the domain1\lib\classes directory. Putting your jars there will add them to the classpath.

You can also put in your ear file under the lib directory (formerly APP-INF\lib). That is the place to put your shared jars.

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