spierce7
07/26/2021, 4:59 AMromainguy
07/26/2021, 6:19 AMolonho
07/26/2021, 6:36 AMalexey.tsvetkov
07/26/2021, 7:30 AMspierce7
07/26/2021, 3:13 PMspierce7
07/26/2021, 6:46 PMspierce7
07/26/2021, 6:52 PM(<http://application.com|application.com>.your.application.69737319.69737409[42608]): Service exited with abnormal code: 1
Nik
07/26/2021, 8:28 PMNik
07/26/2021, 8:35 PMThread.currentThread().contextClassLoader.getResource("some asset or resource file I know is in src/main/resources")
to get the directory of my JAR, opened that Jar as a JarFile
and iterated through its entries()
to open an InputStream to each resource with Thread.currentThread().contextClassLoader.getResourceAsStream("")
. I copied from the InputStream into a folder that would end up at ~/Applications/my-app.app/Contents/Resources/
and then I just reference that as my new file root from wherever I need to do File I/O throughout the application. Would be nice if we had something on a Gradle level that packaged this for us, hopefully the above feature request leads to thatspierce7
07/26/2021, 11:02 PMrunDistributable
task is exactly what I needed. The issue is that the files aren’t found.Nik
07/27/2021, 12:52 AMsrc/main/resources
to the Resources
folder, copies back to a read-only copy, may help as well