View Single Post
Grep
#2
Jan26-11, 04:05 PM
P: 296
Quote Quote by Yoyo_Guru View Post
I started taking a java course at my school and we are required to use macs. I looked for how to open other programs like text edit or the terminal but the code segments I found only worked for java. Is it possible to have a java program open other programs like text edit or the terminal on a mac? And if so how?
I'm not entirely sure what you're asking here. You mean you want to launch some external program from Java code?

If so, the Runtime class has exec functions that can do that:

http://download.oracle.com/javase/6/docs/api/index.html

There's so many ways of doing it. And exec isn't always the best way, but it might be what you're looking for.

I found a page with a rather large number of different ways to run external programs from Java:

http://www.rgagnon.com/javadetails/java-0014.html

Not sure why you want to do that in this case, but that's up to you.