So I have designed an app that takes user input through a gui and saves it into a file, then seeds a template file with this data and saves a new file... I want to deploy this app for both mac and windows, and of course have hit the filepath wall
. i would like to store my templates in the jar itself, and have managed to put them in a "resources" folder but am unable to find a way to access them. I am using the freemarkerDo(Properties c,
String filepath) method to create my final output, and i am at a loss as to how i can properly pass the filepath to this method... all i am doing now is freemarkerDo(data, "stipab.dat"); and that loads the file from the default directory... how do i properly write the string that points to the files that reside in the class's resources folder? ack, i am having a hell of a time describing this issue, let alone resolving it. any assistance would be very much appreciated!
edit:
i am also aware of a built in method from freemarker: void setClassForTemplateLoading(Class cl, String prefix); but it simply does not work... any advice?