This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Native gcj: --resource does not work
- From: Jens Fransson <fransson at fransson dot de>
- To: melko at gmx dot at
- Cc: java at gcc dot gnu dot org
- Date: Mon, 3 Jan 2005 20:13:34 +0100
- Subject: Re: Native gcj: --resource does not work
- Organization: Fransson Software
- References: <31457.1104761925@www32.gmx.net>
- Reply-to: Jens Fransson <fransson at fransson dot de>
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.