S
syvertsj
hello!
I am trying to work with a java application (which is not our source
code) which has a root java process, which 'exec-s' more java
processes. The main app reads a text file with the command line
arguments and uses the Runtime class to exec the new java processes
like the following:
proc = Runtime.getRuntime().exec(inputString(i),null,null);
The "root" java process has a main method of course, as does the
"exec-ed" processes. Both classes extend JFrame.
The startup script sets the classpath explicity, however, the "exec-ed"
processes will not run without the classpath being set explicitly,
meaning, I can only run them using the '-cp' switch and having the
entire classpath explicitly written. The classpath is not inherited
from the root process.
What is wrong here? Does "-cp" work differently when a java process is
exec-ed?
Much thanks.
- Jim
I am trying to work with a java application (which is not our source
code) which has a root java process, which 'exec-s' more java
processes. The main app reads a text file with the command line
arguments and uses the Runtime class to exec the new java processes
like the following:
proc = Runtime.getRuntime().exec(inputString(i),null,null);
The "root" java process has a main method of course, as does the
"exec-ed" processes. Both classes extend JFrame.
The startup script sets the classpath explicity, however, the "exec-ed"
processes will not run without the classpath being set explicitly,
meaning, I can only run them using the '-cp' switch and having the
entire classpath explicitly written. The classpath is not inherited
from the root process.
What is wrong here? Does "-cp" work differently when a java process is
exec-ed?
Much thanks.
- Jim