problem embedding resources

camilla orlandi
Thu Oct 20 08:23:00 GMT 2005

hi everybody,
I just started to try to do something with gcj. for compiling and 
creatung exe files from .java all is ok. I'm encountering problems 
during the "embedding"of some graphics through .o files.
I want to avoid the inclusion of an "image" folder in the distribution 
of the software, including all images into a resources file.

i made:

gcj -c -o swigtif.o --resource=swt.gif swt.gif
output --->swtgif.o ok


gcj -s -fjni --main=HelloWorld -s -o HelloWorld.exe swtgif.o
output ---> HelloWorld.exe ok

it works properly.

the problem begins when the class/classes I have to add into my exe file 
are not located in the root directory of the project, butthey're 
organizedin packages. i.e.

gcj -s -fjni --main=package/HelloWorld -s -o HelloWorld.exe 
package/ swtgif.o

doesn't work. it happens only where classes are divided in packages. if 
they're in the same directory of the .o file the output is ok.

can anyone help me? the problem shouldn't be a path problem, sice the 
runtime directory is always the same...
any ideas?

thank you very much

More information about the Java mailing list