devxlogo

March 20, 1997

Launching Another Application from Java

Question: Is it possible to launch another application from aJava application (not an applet)? Answer: Yes. There are two classes of interest for performingsystem level functions such as this: java.lang.Runtime

What is the Thread.interrupt()method’s purpose?

Question: What is the purpose of the Thread.interrupt()method? I expect that if I call the interrupt()method of a sleeping thread, anInterruptedException will be thrown. Here is aquick code sample showing

How to Prevent Simultaneous Access

Question: How do you lock a file in Java to prevent simultaneous multipleaccesses? Answer: If you’re concerned about simultaneous access by independent processes,you’ll have to rely on the host OS

Using Java to Control System Functions

Question: I would like to be able to browse my server and havean applet/program that would mimic the functions of,say, the control panel on a Macintosh.Would I needto write a