I'm using Maven Shade to make a shaded .jar file for a Jetty project. This project includes some resource files (text property files) that I'd like to read.
How do I access the files inside the said .jar file?
The current folder structure inside the jar when viewed from an file extraction tool is something like the following:
-com
-some
-domain
-AccessFileFromHere.class
-fileIWantToAccess.sql
I want to access the files in the combined jar files root named fileIWantToAccess.sql
. I want to access this file from the java class AccessFileFromHere.class
created from AccessFileFromHere.java
.
The question asked here about accessing a jar file:
Access file in jar file?
Can't be used as they are not using a shaded jar file.