Hello, I am writing an application which needs to load font files. The font files are deployed with other classes on the server (i.e. under the WEB-INF/classes directory). Currently I have the reference built in like this
//private static final String pathToWebapp = "/var/tomcat/jakarta-tomcat-5.0.25/webapps/words2walls"; private static final String pathToWebapp = "C:\\Program Files\\Apache Software Foundation\\Tomcat 5.0\\webapps\\words2walls"; //private static final String pathToPackage = "/WEB-INF/classes/com/words2walls/fonts/"; private static final String pathToPackage = "\\WEB-INF\\classes\\com\\words2walls\\fonts\\"; and I use the above variables as follows: File fontFile = new File (pathToWebapp+pathToPackage+filename); FileInputStream fis = new FileInputStream(fontFile); font = Font.createFont(Font.TRUETYPE_FONT, fis); I tried unsuccessfully to use the class loader, but this might just be my ineptitude. Can someone suggest a way for me to reference these font files dynamically so that I can more easily deploy it in different locations? Thanks! Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]