سؤال

How can I find the native files (on Linux, probably a SO file, on Windows, probably a DLL) the JRE is using for making system-level calls?

How can I find the source code for these files?

BONUS: I'm specifically looking for the native file that JavaMail (reference impl, not GNU) is using to send SMTP/email traffic from. My guess is that its just implementing SMTP over TCP, so probably whatever the java.net.URLConnection's streamHandler is using.

But, regardless of JavaMail, I'd still like to know how/where to find these files. They must be embedded somewhere in the JRE, yes?

هل كانت مفيدة؟

المحلول

Only when there is a native library in use (in your example, SMTP; it's probably implemented in pure Java). The usual way to add a native library is by using the correct flag with the java command line. For example,

java -Djava.library.path=%STARTPATH%\lib -jar somefile.jar
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top