This discussion is archived
6 Replies Latest reply: Aug 27, 2013 3:03 AM by 3210df3f-6a51-4418-9a2f-bbab0424bbbc RSS

Close the Java Console from a batch file

3210df3f-6a51-4418-9a2f-bbab0424bbbc Newbie
Currently Being Moderated

Hi,

I work for a local council that for some reason has purchased an application it very flaky when using Java.  Certain web screens will not launch and the only way I have found to resolve the problem is to manually open up the Java Console and immediately close it prior to launching the web page.  Unfortunately, I have been told that this is not a satisfactory fix when hundreds of people are going to be using the system(don’t you just hate bosses that don’t ask for IT input when purchasing software but expect them so resolve any problems).

Anyway….I have written a batch file that will open & close the console prior to opening the IE URL(see below).

 

Start /wait "" "C:\Program Files\Java\jre6\bin\javacpl.exe"   

ECHO Opening JAVA Console

timeout 4

TASKKILL /F /IM javacpl.exe

 

The problem with this is that this kills any/every session of Java that is running on the PC not just the console.  Is there a way of just closing the console but leave all other instances of java running?

 

Thanks

Wayne

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points