Java integration with Microsoft Exchange

Hi there

I've been trying to integrate Java with Microsoft Exchange for the past few days. I started off by using the Microsoft JDK to wrap around the CDO objects. This approach works but I'd rather use the SUN SDK since this won't tie me to Microsoft. The only way I have found of doing this though is by using J-Integra from Linar to wrap the CDO Com objects. Unfortunately this isn't all that easy and I've been having a few problems. Is there any other way of getting at Exchange objects through Java using the SUN SDK.

Thanks in adavance

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

adriansmithAuthor Commented:
Adjusted points to 75
How much do you know about COM programming?

You will need to write some native code in C++ and call this from your Java code via the JNI.

Details on how to do this are here:

In your native code you will need to get the pointer to the COM interface and you can then pass this back to the Java code as an int value.

Store this and you can then use this to access the COM interface (EG. in Exchange).

The routines that actually access Exchange will have to be written in  native code such as C++ but once you have these set up you can then call them from Java to control Exchange by passing in the pointer to the interface you have acquired earlier.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
adriansmithAuthor Commented:
Thanks Tod. I don't know much about COM programming but I guess this is a good opportunity to learn.
Doing it via JNI/native code means you have to wrap all the CDO functionality in C/C++. This could easily get out of hand but if you have the time and resources, then by all means. If you are like most developers who are always tight on schedule, your best bet would still be to go for a Java to COM bridge like J-Integra for Exchange.

The good thing about proprietary tools is that you'll have support when you need it. Of course, the major drawback is that you have to pay.  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.