Definition at line 8 of file Invoke.java.
static void WhiteBoard.Invoke.javaVM |
( |
char |
c, |
|
|
String |
args |
|
) |
| |
|
static |
Invoke java on the given class in a separate process.
Also, take care of any exceptions.
Definition at line 54 of file Invoke.java.
References WhiteBoard.Invoke.classNames, WhiteBoard.Invoke.javaCmd, WhiteBoard.Invoke.myPrint(), and WhiteBoard.Invoke.pid.
56 String classNm =
classNames[c ==
'S'? 0 : c ==
'C' ? 1 : 2];
57 String cmd =
javaCmd +
" " + classNm +
" " +
pid +
" " + args;
60 Runtime r = Runtime.getRuntime();
63 Process p = r.exec(cmd);
65 }
catch(Exception e) {
66 System.out.println(
"Error executing r.exec(" + cmd +
")");
68 }
catch(Exception e) {
69 System.out.println(
"Runtime Error executing [" + cmd +
"]");
static void myPrint(String who, String what)
static final String classNames[]
static String javaCmd
The following Srings isolate path related issues.
static Remote WhiteBoard.Invoke.lookup |
( |
String |
url | ) |
|
|
static |
static void WhiteBoard.Invoke.main |
( |
String[] |
args | ) |
|
|
static |
Definition at line 89 of file Invoke.java.
90 Invoke.javaVM(
'S',
"");
static String WhiteBoard.Invoke.makeURL |
( |
char |
c, |
|
|
String |
id |
|
) |
| |
|
static |
static void WhiteBoard.Invoke.myPrint |
( |
String |
who, |
|
|
String |
what |
|
) |
| |
|
static |
static String WhiteBoard.Invoke.promptAndGet |
( |
String |
msg | ) |
|
|
static |
Definition at line 37 of file Invoke.java.
References WhiteBoard.Invoke.stdIn.
39 stdIn =
new BufferedReader(
new InputStreamReader(System.in));
43 System.out.print(msg +
": ");
46 }
catch (Exception e) {e.printStackTrace();}
47 if (s == null || s ==
"") s =
"empty";
static BufferedReader stdIn
static void WhiteBoard.Invoke.setJavaCmdPath |
( |
String |
s | ) |
|
|
static |
final String WhiteBoard.Invoke.clientClass = "WhiteBoard.WbClientImpl" |
|
staticprivate |
String WhiteBoard.Invoke.javaCmd = "java" |
|
staticprivate |
final String WhiteBoard.Invoke.linesClass = "WhiteBoard.LinesFrameImpl" |
|
staticprivate |
int WhiteBoard.Invoke.pid = 0 |
|
staticprivate |
final String WhiteBoard.Invoke.rmiRegistryPfx = "//localhost/" |
|
staticprivate |
final String WhiteBoard.Invoke.serverClass = "WhiteBoard.WbServerImpl" |
|
staticprivate |
BufferedReader WhiteBoard.Invoke.stdIn |
|
staticprivate |
int WhiteBoard.Invoke.verbosity = 1 |
|
static |
The documentation for this class was generated from the following file: