Skip to main content

Java help, ASAP...

1 reply [Last post]
Joined: 2007-11-03
Points: 0

Hey guys

I am very new to Java and i have to program in Eclippse. I am using the JFrame things to do a project.

I have 2 questions, firstly i want microsoft word 2003 to open but i have no clue what code to use.

Secondly and most important i want MS outlook the email thing to open when u click on a button. I know how all the buttons work I just need all the code and I have no clue what to do.

Thanks alot

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-04-16
Points: 0

Out of the box java provided nothing to work with native apps such as Word until JSE 6. JSE 6 introduced java.awt.Desktop which allows interaction with the native mail client and opens documents using the native application associated with that type.

See the article
Using the Desktop API in Java SE 6 and Desktop API for more details.

For Microsoft Word this may or may not fulfill what you need. If you want to actualy interact with a document in Word then you'll probably need a third party solution - either one that provides a java "Com Wrapper" (for example j-integra - disclaimer, I've never used it, just found it using google) or by using a java library that can read/write Word Documents (i.e. by-passing Microsoft Word) - for example Apache POI (disclaimer I've used POI for Excel and works v.well - but I haven't used it for Word docs).