[Solved] ZipLocator doesn't make sense the way its designed

This is something thats bugged me for awhile with ZipLocator.


are on the classpath so I would think that placing a zip file in the resources folder or the src folder would be appropriate for the locator path of

registerLocator("my.zip", ZipLocator.class);

or some subfolder there.

OR even placing anything in the assets folder would also work,

registerLocator("Textures/my.zip", ZipLocator.class);

BUT instead you have to give the full path

registerLocator("assets/Textures/my.zip", ZipLocator.class);
registerLocator("src/main/java/my.zip", ZipLocator.class);
registerLocator("src/main/resources/my.zip", ZipLocator.class);

which makes ZipLocator unusable since those folders do not exist in any jars of the built project.

If the file is in the top level of the project folder, you have to manually sweep it into the built jar with your build file.

What am I missing here?

ZipLocator is designed for assets in archives where the archives are located in the filesystem, not the classpath. The locator you’re wanting would be named something like ClasspathZipLocator.

I must be expecting to much from the name.