This is the mail archive of the java-patches@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]

Re: Java runtime patch: compile resource files into executables


Per wrote:
> Note that we also want to be able to add resource files to shared
> libraries.

Yes, this works.  I tried it with gnu.regexp which I've built into
lib-gnu-regexp.so.  The Makefile includes...

props.o: $(srcdir)/upstream/src/gnu/regexp/MessagesBundle.properties
        gcj -fPIC -R gnu/regexp/MessagesBundle.properties -o props.o -c $<

..and the runtime has no problem finding this.

> Some of these shared libraries will be associated with
> their own classloaders, and in that case the name of the resource
> is local to the classloader.  (I'm referring to my SharedLibLoader
> class, which I need to check in!)

I see.  Right now I've got a global list of core files.  I suppose there
should eventually be a chain per classloader.  I can make this change once you
check your changes in (but I'd prefer not to wait).

> +typedef struct core_chain_struct
> +{
> +  int name_length;
> +  char *name;
> +  int data_length;
> +  char *data;
>
> Should this be:
>
>   jint name_length;
>   const char *name;
>   jint data_length;
>   const void *data;

The jint change isn't necessary, but I can make the other changes.

AG



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