Getting Java to open external file.

How do i get java to open a .doc file?

Page 1 of 1

6 Replies - 5116 Views - Last Post: 30 March 2007 - 02:58 AM Rate Topic: -----

#1 lost69  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 20-March 07

Getting Java to open external file.

Posted 20 March 2007 - 12:38 PM

Hi,

I have a java program with buttons e.t.c. One particular button is "Help" Now when this is pressed i want a Word Document to open. How can i go about this?

Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: Getting Java to open external file.

#2 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Getting Java to open external file.

Posted 20 March 2007 - 09:33 PM

well I think the exec() function might do the trick here.
Was This Post Helpful? 0
  • +
  • -

#3 keems21  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 185
  • Joined: 03-February 07

Re: Getting Java to open external file.

Posted 20 March 2007 - 10:23 PM

Look over this stuff.
I've never used it personally, but from what I've heard, Java runtime is similar to opening and running programs through the cmd prompt, or something like that.

http://java.sun.com/...ng/Runtime.html
Was This Post Helpful? 0
  • +
  • -

#4 lost69  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 20-March 07

Re: Getting Java to open external file.

Posted 21 March 2007 - 02:48 AM

Thanks people, hopefully get it working sometime today.

:^:
Was This Post Helpful? 0
  • +
  • -

#5 lost69  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 20-March 07

Re: Getting Java to open external file.

Posted 21 March 2007 - 04:53 AM

OK, i have it opening word, any ideas on how to get it to open a specific Word document?
Was This Post Helpful? 0
  • +
  • -

#6 alpabarot  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-March 07

Re: Getting Java to open external file.

Posted 21 March 2007 - 05:45 AM

Hey!!

Your Forum rocks!! Just wanted to share something with ya…
There is this amazing site that I came across where u can make money by sharing information…check it out here’s the link http://www.myndnet.c...amp;channel=138

The coolest part is…every time ur information gets sold u get paid for it!!
I signed it for it.. very cool stuff… u can also mail me at barot.alpa@gmail.com

Cheers!
Alpa
Was This Post Helpful? 0
  • +
  • -

#7 dai griff  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-March 07

Re: Getting Java to open external file.

Post icon  Posted 30 March 2007 - 02:58 AM

View Postlost69, on 21 Mar, 2007 - 04:53 AM, said:

OK, i have it opening word, any ideas on how to get it to open a specific Word document?


how did u get it to open word?? i'v tried loads of ways and i cant get it to open anything????
please can u help me. :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1