Running the program outside a jar file prints out something like this: /C:/MyProjects/Project1/com/name/folder/fonts/verdana.ttf
I'll try the getResource method of ClassLoader and see what happens. Thanks ----- Original Message ----- From: "Paulo Soares" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, August 23, 2002 10:19 PM Subject: Re: [iText-questions] jar cannot load fonts > If you print ( getClass().getResource( "fonts/verdana.ttf" ) ).getPath() > what does it return? If you are using it in a web server you may have to go > through the class loader. > > Best Regards, > Paulo Soares > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, August 23, 2002 20:18 > Subject: [iText-questions] jar cannot load fonts > > > > I get this exception when trying to register a font using FontFactory > > method: > > > > ExceptionConverter: java.io.FileNotFoundException: > > > > and the full arguments passed to the method:: > > register( ( getClass().getResource( "fonts/verdana.ttf" ) ).getPath(), > > "verdana" ); > > > > This works outside a jar file. Any way I can get it to work from iside > > the jar? The fonts are copied to a subdirectory of the package. > > > > Would it work if the register method accepted a java.net.URL instead? > > > > Can it be extended to make it work with a URL? > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: OSDN - Tired of that same old > > cell phone? Get a new here for FREE! > > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > > _______________________________________________ > > iText-questions mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
