- Make sure the case of the font file name & extension is exactly the same in code as on the file system. Windows may not be case sensitive, but Java is.
- Check the
InputStream
returned bygetResourceAsStream()
fornull
. If it isnull
, that indicates the resources was not located. - Put the font in the root of the Jar and add “https://stackoverflow.com/” as the prefix to the name.