This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: JNI vs. #ifdef INTERPRETER
MD> _Jv_GetJNIEnvNewFrame and _Jv_LookupJNIMethod aren't defined
MD> unless INTERPRETER is defined which means that it isn't possible
MD> to use JNI on platforms like Sparc Solaris that don't build with
MD> interpreter support.
TT> Could you try the appended patch and see if it works?
TT> If it does I will check it in.
I does prevent the linkage problems like below. Unfortunately, on
sparc-sun-solaris2.7 with today's CVS, I'm getting weird untraceable
startup crashes probably related to C++. (Hello world in C++ links
but dies with a Bus Error.)
$ CLASSPATH=/net/maya/disk1/Scratch/mgd/build/swarm-jdk/java gcj --encoding=UTF-8 TestSwarm.java /net/maya/disk1/Scratch/mgd/build/swarm-jdk/java/swarm/swarm.so --main=TestSwarm
/net/maya/disk1/Scratch/mgd/build/swarm-jdk/java/swarm/swarm.so: undefined reference to `_Jv_GetJNIEnvNewFrame'
/net/maya/disk1/Scratch/mgd/build/swarm-jdk/java/swarm/swarm.so: undefined reference to `_Jv_LookupJNIMethod'
collect2: ld returned 1 exit status