I'm trying to distribute a GATE application as a standalone JAR file. I have the GATE plugins as resources on my classpath in the project, but setGateHome()
requires a File object, which I can't get from a resource packaged inside a JAR.
I assumed that Java IO would be sufficiently abstracted that the APIs could handle this case, but it turns out that File objects only refer to physical files on disk.
Is there any alternative way to do this with the GATE API? Or some option to force JARs to unpack themselves to a temporary folder before running?
The example in the docs is for a servlet, but in that case it's possible to get a file object from the servlet (I think because WAR files are unzipped by the servlet container).