M
Martin Gregorie
I need to be able to replace a default resource file with a site-specific
one. Currently I'm doing the job with a bash script that builds the
replacement resource file and then runs jar in update mode to put the new
resource into the jarfile.
This works and works well, but isn't particularly portable, so I looked
into writing a Java utility, but the java.util.jar and/or java.util.zip
packages don't seem to be able to replace files in an existing jar file.
I've thought of a few other approaches using portable scripting tools:
- Python: but not all machines have it installed
- Perl: same problem and the install is even bigger than Python
- Jython: the jars etc. are large and installation not so simple
on some systems
If I have to use any of these I'll recode the bash script in Python
because that looks to be a relatively simple install on, say, Windows.
What else would work?
one. Currently I'm doing the job with a bash script that builds the
replacement resource file and then runs jar in update mode to put the new
resource into the jarfile.
This works and works well, but isn't particularly portable, so I looked
into writing a Java utility, but the java.util.jar and/or java.util.zip
packages don't seem to be able to replace files in an existing jar file.
I've thought of a few other approaches using portable scripting tools:
- Python: but not all machines have it installed
- Perl: same problem and the install is even bigger than Python
- Jython: the jars etc. are large and installation not so simple
on some systems
If I have to use any of these I'll recode the bash script in Python
because that looks to be a relatively simple install on, say, Windows.
What else would work?