I'm having a jar file say toolkit.jar which contains resource files under com.project.resources. When I tested independently I can read those resources with Class.getResource
. But when I used the jar file in war module (web service), getResource always returns null. How can I access those resource file?
com/project/resources/ contains arial.ttf
com/project/toolkit/ contains ToolKit.java
renderer is ITextRenderer object.
renderer.getFontResolver().addFont(this.getClass().getResource("../resources/arial.ttf").
toString(), BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
And this toolkit.jar is using in a web service.