Lets say I have a class called Scope that has a nested class called Variable, how exactly do I use javap -s
to get the JNI signatures of the classes inside? I've tried doing
javap -classpath <classpath> -s Scope$Variable
, but this does not seem to work. It seems to just get me the same information as if I only typed "Scope" rather than "Scope$Variable".
Thanks for any help
If you are running
javap
in a Linux/Unix environment, then the$
will be interpreted by the shell and not byjavap
. Therefore it mus be escaped. Simplest solution would be:Without the quotes the shell (I assume a *sh offspring) will try to substitute the
$Variable
part with the contents of the environment variableVariable
. I assume that no such variable exists and there fore nothing (as in "empty string") is substituted. Hencejavap
sees onlyIf you are running the command from Windows, then this is not an issue, because the magical character would be
%
.BTW: I don't know why JNI is involved here.
Works for me:
javap -s com.oracle.net.Sdp$SdpSocket
: