Classification: |
Java |
Category: |
General |
Created: |
05/08/2002 |
Modified: |
07/04/2002 |
Number: |
FAQ-0788 |
Platform: |
Symbian OS v6.0 |
|
Question: I would like to be able to launch the CsHelp app from a menu item or the CBA, like CFrame v0.1 tries to do. But the command
line invoked by CFrame doesn't work. Why is this?
Answer: The command prompt passed to Runtime.exec() in CFrame v0.1 is wrong. You can either call the following method from your event
handler or put it into a CFrame subclass, in which case it will override the method of the same name in CFrame and be immediately
available from the Tools menu or the CBA:
public void doHelp() { try { Runtime.getRuntime().exec( "z:\\System\\Programs\\AppRun.exe c:\\System\\Apps\\CsHelp\\CsHelp.app" ); } catch( java.io.IOException ioe ) { ioe.printStackTrace(); } }
Note:1. This approach will only work on a 9200 series Communicator, not under PC emulation, on which the use of Runtime.exec()
is not supported.
2. Pressing the system help key while the Java app is running will, by default, have the same effect of launching CsHelp.
If you want to use a custom help utility you will have to capture the system help key in the manner described in FAQ-0781
, so that it too launches your custom help.
|