Adam Heath wrote:
Well, -classpath(jdk), --classpath(gcj).
It appears to me that gcj supports both -classpath and --classpath
equally. It does not support the newer -cp option.
However, gij does not appear to support either option, though it does
support a CLASSPATH environment variable. It also supports the
-jar option.
Having to specify -C to compile to .class.
You were complaining about $(JAVAC). I don't understand what is the
problem is with JAVAC="gcj -C".
I've set up the Kawa configure+Makefiles so that if you configure
--with-gcj not only do the .java files get compiled to a .jar using
gcj -C, but they also get compiled to a kawa-VERSION.so and a kawa
executable. If you don't specify --with-gcj the default for $(JAVAC)
is "java", though you can of course also use "jikes" - or "gcj -C".
The goal is to just update an alternative, and be able to use gcj.
Since I don't know how /etc/alternatives mechanism works, I can't
help you there. But in the worst you need to do is write a script:
#!/bin/sh
exec /usr/bin/gcj -C "$@"