Is using javaw instead of java not an option?
What? As the question states, I need to open javacpl.exe(this is the java control panel) and then close it using a .bat file without killing off anything other process that is using Java. I am not touching the Java.exe so using the javaw.exe wouldn't make any sense?
javacpl.exe starts javaw.exe and exits itself. So the process you have to kill is javaw.exe, and that will only do what you want if nothing else is running javaw.exe, such as your application.
Why can't you just let the *user* exit the Java Control Panel?
If you are using windows. Go to the control panel and click java.
Under "advance" select do not start console.
I have already suggested to the project manager that it would be simple for the *user* to close the window but he does not want this as a solution. Although it maybe the only one he gets.
The thing that I need to do is open up the control panel! This is the only way I know how to get the application past a screen that fails if I do not do this.
As I said, I need to automate this function prior to opening the URL. I have managed to open the javacpl.exe but I am unable to close it via the bat file.
This needs doing prior to every URL launch as we have a *hot-desking* policy so I cannot guarantee that the same person will log onto the same PC every day and this problem seems to be PC/NTLogin related so therefore this may need to be done hundreds/thousands of times.
I have contacted the 3rd party supplier who we purchased this application from and they are also looking into a solution but at the moment, due to me finding a temporary fix, they do not seem to deem it as high priority.