Fwd: Resources in natively compiled executables
Anthony Green
green@redhat.com
Thu Apr 15 14:50:00 GMT 2004
On Thu, 2004-04-15 at 06:59, Chris Burdess wrote:
> > If I just compile my jar to native directly, i.e.:
> >
> > # gcj -c -o activation.o activation.jar
> >
> > this works normally. If instead I try:
> >
> > # gcj -c --resource META-INF/mailcap.default --resource
> > META-INF/mimetypes.default -o activation.o activation.jar
> >
> > then it completes with no error but:
The documentation says that you can't specify multiple input files when
using --resource (or -C). You'll need to compile those resource files
into multiple .o files. Even then, it's not clear what you're trying to
do.
This command...
$ gcj -c --resource RESOURCENAME FILENAME -o OBJECTNAME
...will compile FILENAME into OBJECTNAME. The contents of FILENAME
will be available at runtime by reading from the URL
core:/RESOURCENAME. We put core:/ automatically at the end of the
classpath, so methods like ResourceBundle.getBundle(RESOURCENAME) will
magically work.
AG
--
Anthony Green <green@redhat.com>
Red Hat, Inc.
More information about the Java
mailing list