Problem when getting the process of execution of JAVAWS on PC
Hello,
I give here a part of my code:
boolean stillrunning = true;
Process p =null;
while (stillrunning)
{
try
{
p=Runtime.getRuntime().exec(javawsPath + "javaws " + portalURL_);
}
catch (Exception ext)
{
printException(ext);
}
try{
int g = p.exitValue();
stillrunning = false;
}
catch(IllegalThreadStateException ex)
{
printException(ex);
}
}
The process of javaws is running normally on my Pc (Win Xp), but I have always stillrunning to false, it seems that the process p is killed but the javaws is still running.
Can you help me? how can I get the Process p?
Best regards
# 2
Hello,
Ok , I put the part that causes a problem to me :
============================
Process p = null;
boolean stillrunning= true;
try{
p=Runtime.getRuntime().exec(javawsPath + "javaws " + portalURL_);
}
catch (Exception ext)
{
printException(ext);
}
try{
int g = p.exitValue();
stillrunning = false;
}
catch(IllegalThreadStateException ex)
{
printException(ex);
}
==========================
The value of "stillrunning" is always "false", the process p is killed, however the application "javaws" is running.
The value of exit is 0,
Is it a normal behaviour?
My purpose is to get the id of the process of javaws that I have launched, have you any idea how to get it.
Thank you
# 4
Hello i have the same problem, you six successful one to resolve? nobody gives to us of the answers?there are some things of the java that they make me to suspect, perhaps do not want to admit that they exist of the bug in jvm.
# 5
The javaws process is a short lived process that just determines the right version of java to launch, and exec's it with the right args to run the application under Java Web Start.
The process that continues to run for the duration of the application is javaw.exe (on windows).
/Andy