I am trying to create a .jar that contains non-standard images and fonts that I added to the resource folder in my project. I can upload them to my project with the following code.
URL url = ClassLoader.getSystemResource("./some_font.ttf"); Font font = Font.createFont(Font.TRUETYPE_FONT, url.openStream());
While this works, when I run the program in the IDE, when the jar is exported, it cannot load the font.
java intellij-idea gradle
Beryllium
source share