It works fine when compiling project, but after exporting it to a runnable jar and launching, it can’t find external files and throws an error. What should I do?
It works fine when compiling project, but after exporting it to a runnable jar
Share
You could attempt building a
fat jarthat includes all the jars. It contains a custom class loader to load the jars referenced externally by your project.Try using http://fjep.sourceforge.net/ plugin to build a fat jar.
You can export a java project containing jars using the
File -> Export -> Other -> One Jar Exporter.The jar thus exported works fine.