While trying the prime example from the developerWorks article at http://www-106.ibm.com/developerworks/java/library/j-native.html?loc=j and gcj I get the error: "gcj: libgcj.spec: No such file or directory". Actually almost any attempt to run gcj gives that error. I had no real luck searching for the error message on google. I'll try to figure out more details later.
libjava which provides libgcj.spec and the library isn't included with gcc 2.95.3. The example on developerworks uses gcc 3.0.1. Java to native compilation is only considered supported since v3 of gcc. Since v3 still causes a lot of problems it's not supported by gentoo. You can install it by yourself to another prefix though if you really need the java to native compilation support. If you install it to /opt/gcc-3.0.3 you have to set the env vars as followed to use the new gcc instead of the old one : export COMPILER_PATH="/opt/gcc-3.0.3" export GCC_EXEC_PREFIX="$COMPILER_PATH/lib/gcc-lib/" export PATH="$COMPILER_PATH/bin:$PATH" export MANPATH="$COMPILER_PATH/man:$MANPATH" export INFOPATH="$COMPILER_PATH/info:$INFOPATH" export CPLUS_INCLUDE_PATH="$COMPILER_PATH/include/g++-v3/" Hope this helps.