Put all of the resources in a ZIP archive.
Rename the file from example.zip
to example.pak
(or whatever else you want).
Lastly, uncompress the archive and load all of your resources.
ZipFile zipFile = new ZipFile("/external/path/to/test.zip");
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while(entries.hasMoreElements()){
ZipEntry entry = entries.nextElement();
InputStream stream = zipFile.getInputStream(entry);
}
You can also read an archive from inside of your JAR file.
URL url = new URL("jar:file:/path/of/file.jar!/resources.pak");
The location of the running JAR can be easily retrieved (as long as the class that this is called from has been loaded from that JAR).
new File(MyClass.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());