Page 1 of 1

A way for opening docx file within Jar?

PostPosted: Fri May 24, 2019 10:41 pm
by borja
Hello,

Im doing a simple app that reads a xlsx file, parse the file, and outputs a docx file using a template. To do editing i first read the empty docx file that contains some mailmerge fields, i replace them and write the output.
Instead of reading the file from same folder as Jar is located or other route, maybe its a way to read the file from a resources dir inside Jar
I did some research on google but i couldn't find anything. Only txt or image files.

Thank you!

Re: A way for opening docx file within Jar?

PostPosted: Sun May 26, 2019 5:43 pm
by jason
The jar is on your classpath?

If so, you could probably use https://github.com/plutext/docx4j/blob/ ... s.java#L68