Access platform specific eMail Programs (Outlook, Messenger, etc.) from a Java Programm
1 posts in topic
Flat View  Flat View

Posted By:   Markus_Seibold
Posted On:   Thursday, February 28, 2002 06:26 AM

I want to write a Java Program that basically sends the current assigned IP of any PC to my eMail account.

Therefore I want to use the platform specific individual eMail Program on every PC.

How can I access a variety of different eMail Programs from my Java Application? I guessed that I have to use JNI, donĀ“t I? But how could this work?

Thanks alot, Markus

Re: Access platform specific eMail Programs (Outlook, Messenger, etc.) from a Java Programm

Posted By:   Alexander_Krapf  
Posted On:   Thursday, March 14, 2002 03:00 PM


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:



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,


About | Sitemap | Contact