Native gcj: --resource does not work
Jens Fransson
fransson@fransson.de
Mon Jan 3 19:13:00 GMT 2005
Hello,
thanks for your reply!
Your technique only works with class-files, which is not a real
problem, although I heard that gcj produces better output when working
on plain source code.
Your mail does not say anything about wether you tried to load a
.properties file via the ResourceBundle.getBundle() method. This did
not work for me, but it seems to me that this is rather a problem with the
implementation of ResourceBundle.java than with the "--resource"
switch of gcj. I suspect this because I was able to create a
workaround using ClassLoader.getSystemResource() which finds the
.properties file.
Did you try the ResourceBundle.getBundle() method?
Nice greetings from Germany/Hamburg,
Jens
on Monday, 3. January 2005 at 15:18 you wrote:
mga> You need no --resource to load the RessourceBundle! You should only put it
mga> into the jar file and then make out of the jar file the exe-file!!
mga> Looks like this:
mga> mkdir bin
mga> cd bin
mga> mkdir resources
mga> cd ..
mga> mkdir obj
mga> mkdir include
mga> xcopy /Q src\resources\*.* .\bin\resources
mga> cd bin
mga> jar cf %MAIN%.jar com\test\gui\*.class com\test\gui\dialog\*.class
mga> com\test\gui\functions\*.class resources\*.*
mga> cd ..
mga> make the object-file out of jar:
mga> gcj --classpath=obj;bin; -fjni -g0 -Os -c include\%MAIN%.jar -o obj\%MAIN%.o
mga> make the library with out of jar:
mga> cd obj
mga> ar -crs lib%MAIN%.a *.o
mga> move lib%MAIN%.a ..\include
mga> cd ..
mga> make the exe:
mga> gcj -mwindows --main=com.test.gui.%MAIN% -fjni -g0 -Os -s -o %MAIN%.exe
mga> obj\*.o include\*.a
mga> and it works fine!!
mga> nice greetings from austria.
More information about the Java
mailing list