Posted By:
Alexander_Krapf
Posted On:
Thursday, March 14, 2002 03:00 PM
Markus,
First, why don't you want to use JavaMail?
Second, you would have to write a Java class that has a native method that will be called when the platform specific functionality is to be executed. Then you need to implement that method differently for each platform and compile the implementations into a .dll or a .so or a .a with or without library prefix. For Windows and Solaris for example, you would need mycode.dll and libmycode.so files in your application.
For different platforms that use the same filename, you might also have to implement a special naming scheme that allows you to ship more than one native library without naming conflicts, for example:
libmycode-sunos.so
libmycode-linux.so
and your loader would have to load the appropriate library based on the value of the os.name property.
I hope this gives you some pointers and I didn't waste your time ;-)
Good luck,
Alex