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]

Re: classpaths and jar files


>>>>> "Per" == Per Bothner <per@bothner.com> writes:

Per> I would rather have any resource files etc from a .jar be
Per> compiled into the executable (or shared library).

I definitely agree.

Per> Thus a resource file should be compiled to an initialized byte
Per> array in a read-only data segment.

One way to do this, which is pretty lame but easy to implement, is to
compile the resource file into an appropriately-named Java class file
which is then compiled and linked in to the application.  This is a
bit of a hack though.

I guess we could implement this "for real" by defining a global table
which maps resource bundle names to byte arrays.  Then we would use
static constructors to initialize the table.  Finally we would write a
simple gcc front end to turn a resource file into a small C++ program
which we'd run through cc1plus.  This actually wouldn't be too hard.

Tom


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