F
Ferman
Hi,
I found a solution. I run a command by exec() on UNIX OS.
program part like this;
try
{
String vCommand({"echo", "$$"});
Process p = Runtime.getRuntime().exec(vCommand);
BufferedReader br =
new BufferedReader(new InputStreamReader(p.getInputStream()));
int pid = Integer.parseInt(br.readLine());
System.out.println(pid);
p.destroy();
p = null;
br = null;
}
catch (java.io.IOException e)
{
System.out.println(e);
}
But it is give me "$$" characters. I didn't obtain the process id. What is
the problem ?
OS: SunOS
I found a solution. I run a command by exec() on UNIX OS.
program part like this;
try
{
String vCommand({"echo", "$$"});
Process p = Runtime.getRuntime().exec(vCommand);
BufferedReader br =
new BufferedReader(new InputStreamReader(p.getInputStream()));
int pid = Integer.parseInt(br.readLine());
System.out.println(pid);
p.destroy();
p = null;
br = null;
}
catch (java.io.IOException e)
{
System.out.println(e);
}
But it is give me "$$" characters. I didn't obtain the process id. What is
the problem ?
OS: SunOS