Skip to content
Advertisement

Tag: getresource

Loading images/files inside jar

There are already heaps of answers to this problem. I have also tried a lot of them. I have not found a solution yet. I load some images within my project (Swing – ImageIcons). In the run dialog all of them are also displayed in my GUI. But after compiling the program can’t be started at all. The error messages

Copy directory from a jar file

I have recently developed an application and created the jar file. One of my classes creates an output directory, populating it with files from its resource. My code is something like this: Unfortunately this doesn’t work. I tried the following without luck: Using Streams to solve similar stuff on other classes but it doesn’t work with dirs. Code was similar

Advertisement