This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: Resources in natively compiled executables


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]