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: Strange issue with getResourceAsStream()


Erik Poupaert wrote:
...
> I regularly use getResourceAsStream() by myself, and I don't have any
> problems with it. There are potentially two reasons why you're having > this problem.
>
> One. You're linking statically, and the SWT library sources have not
> been patched to force reflection to work.



That was it. I added your extra 5 lines to FileFormat.java, and the issue went away. Thanks alot!


I don't want to stray TOO far from the topicality of GNU tools here (although I suppose it could be argued that SWT is a dominant topic in GCJ circles). However, I've got a couple of questions for you Erik (or anyone else who compiles and static-links SWT with GCJ):

- What all patches HAVE you applied to your SWT codebase, to facilitate compilation and static linking? I knew about the obvious patches to Library.java, removing calls to "System.loadLibrary(...)". However, this was the first mention I've heard about the need for patching FileFormat.java. Are there any other issues you've run across yet and patched yourself?

- Would the 5 lines added to FileFormat.java have any negative effect on non-static linking? I'm wondering if it would be safe to sumbit this as a patch to the Eclipse folks, or if it is something very static-specific like those "System.loadLibrary(...)" calls.

Steve



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