Accessing multiple files from internal resources

I have a lot of files that are packaged into the jar, I'm using these for something like a data based approach (I guess). And now I'd like to easily move them outside the jar, so that it can be modified by others. What would the best approach be here? My initial thought was that I use json formatted files in the jar that kind of show what files that are in directories, but this gets impractical with large amount of files/directories. I'm now thinking, should I use a zip file as an internal resource with all the relevant content, but this gets a bit hard to access when I want to modify this content. What's your opinion on how to proceed?
3 Replies
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Thorinwasher! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Thorinwasher
ThorinwasherOP2mo ago
Just doing this worked. thanks @Thorinwasher
processResources {
mustRunAfter("zipResources")
}

register("zipResources") {
zipTo(File("./src/main/resources/plants.zip"), File("./src/main/ziped-resources"))
}
}
processResources {
mustRunAfter("zipResources")
}

register("zipResources") {
zipTo(File("./src/main/resources/plants.zip"), File("./src/main/ziped-resources"))
}
}
JavaBot
JavaBot2mo ago
Post Closed
This post has been closed by <@270177852157067264> for the following reason:
Solved it myself

Did you find this page helpful?