gcj 2.96 and rh7 [I18N/getopt]
Bryce McKinlay
bryce@albatross.co.nz
Wed Nov 29 02:33:00 GMT 2000
David Brownell wrote:
> One more problem I forgot to mention -- I'd be very interested to
> know how other folk are dealing with this one.
>> I used the "gnu.getopt" package, a version I found somewhere that
> seemed to be as current as it gets. But it didn't work with GCJ,
> because of ResourceBundle problems related to the I18N that had
> been done using text files. It couldn't load the default (which
> I recall as English) properties file, and the exception couldn't
> be recovered from.
I fixed a couple of bugs tonight that were exposed by getopt. It should
now work correctly provided it can find its resources on the CLASSPATH
somewhere:
[bryce@kawarau t]$ ../gohello -q
Exception in thread "main" java.util.MissingResourceException: can't
load bundle
at 0x4018ac59: java::lang::Throwable::Throwable(java::lang::String
*)
at 0x4017f562: java::lang::Exception::Exception(java::lang::String
*)
(blah blah blah)
[bryce@kawarau t]$ export CLASSPATH=../java-getopt-1.0.7.jar
[bryce@kawarau t]$ ../gohello -q
Hello: invalid option -- q
[bryce@kawarau t]$ export LANG="de_DE"
[bryce@kawarau t]$ ../gohello -q
Hello: Ungültige Option -- q
Having to have the .jar around does of course make it kind of useless
so I agree with Per that a better solution is needed. However, it
really needs to be able to handle any kind of data since java apps also
regularly load binary resources like icons and sounds from .jar files
via the classpath. Isn't there an ELF section or something that we
could just stick a bunch of zip data into and treat that as being on
the classpath? I guess portability might be a problem in this case.
regards
[ bryce ]
More information about the Java
mailing list