Re: possible problem with gcjh (long)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Raif" == Raif S Naffah <raif@xxxxxxxxxxxxxxx> writes:

Raif> $ gcjh -jni -classpath . -o OC_IC.h OC$IC

gcjh is probably just seeing 'OC' here, unless you actually quoted the
'$' on the command line.  This explains why the gcjh-generated OC_IC.h
is mostly empty -- the class OC has no native methods.

Try OC\$IC and you will get a different result.

Raif> $ /opt/jdk1.5.0_08/bin/javah -jni -classpath . -o OC_IC.h OC$IC

I'd guess that javah is also reading inner classes... gcjh will
probably never do this, I'm afraid, but we should probably modify the
javah in Classpath to be compatible here.  That shouldn't be hard.
Could you file a PR?

I don't have the JDK installed here so I didn't try to reproduce
this...

Raif> JNIEXPORT void JNICALL Java_OC_IC_natInit

Hmm, gcjh generates Java_OC_00024IC_natInit.
I'm surprised by the above, I (obviously I suppose :) would have
picked the gcjh interpretation instead.

Perhaps some experimentation is in order... what happens if you have a
class with an explicit '$' in its name that has a native method?

Tom


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux