Java does not quit

Hi - I'm totally new in Processing and have just tried to run some of the examples. They run, but when the program has finished the Javaicon stays in the dock of my Macbook - one for each example. It's not possible to force quit or to restart the computer. I have to shut it down with the power button. Am I doing something wrong?

Answers

  • Hello. I have had the same issue as you when it comes to running the processing given examples. You open them up, they freeze up, and then its a pain in the backside to get them closed. What I would recommend is not opening those, because it can have to do with either your computer being too old, you not being connected to the internet, or the sketch is trying to run something that your computer can not support hardware related. (OpenGL and P3D for example). Now this happened to me on my old Windows computer and the best thing for me was to use the task manager. Now considering that you have a Macbook, i'm sure you have Terminal, maybe? I'm not so sure when it comes to Mac's which one has Terminal or not. But if you do, you could look online to see how to force close with Terminal? Maybe that will help. Tell me your results

  • It is not only the example programs, that has a problem. If I make a little program myself it is the same. I am not able to use the Kill command in Terminal as I cannot determine the app’s Process ID (PID)- not able to identify it in Activity Monitor. My Macbook is only one year old, so I don't think that is the problem. I think it is something with Java?

  • the top command will show you running processes. ditto ps -ef. it might not be obvious which is the processing sketch and which is processing ide though.

  • ps -ef worked fine - but have You got any clou to the name of the processing sketch activity? I have closed Processing IDE normaly without any problem but the icon for Java is still in the dock.

  • Try px auxwwwww which will give you more detail. Look for the name of the sketch.

  • I can find the PID of the example code with top, when it is running. If I kill the proces the PID disappears but the window with the examplecode in Processing is stil open and the icon in the dock is still there - and stays there when I quits Processing. Seems it is a problem with Processing not closing the running codes proberly and leaves something behind? Only way to get rid of the icons is to hold down the power button until the Mac closes.

  • I have the same problem. Neither the activity monitor nor ps show any matching processes. The only way to get rid of the instances clogging up the dock seems to be a reboot.

    • OS X "El Capitan 10.11.5"
    • Processing Version "3.1.2"
    • Java Version "1.8.0_102"
  • Can you try calling the exit() method, like for example in mousePressed() just as a quick test to see if it will fix your issue? If that works, then it would be a good start.

    Kf

  • edited August 2016

    Thank you, Kf.

    Calling the exit() method makes the sketch exit at once, as expected, however the ‘java’ instance gets stuck in the dock as before.

    This seems to be a java/osx-problem, unrelated to processing: I tried to view a webpage with java-content today and had to start the Java Control Panel in the OS X System Preferences in order to allow java to run in the browser — this generated an instance as well.

    This stack overflow thread suggests looking for java processes with the command jps -v but the only processes I found were the ones running in the browser.

  • The issue may have been caused by having manually installed the legacy version of Java 6 while in fact the same version comes already as part of the system by default (in my case a Mac OSX with multiple admin accounts).

    If so, it seems then that Java does not have permissions to quit itself.

    Possible solution: reinstalling the legacy version of java using the root username password to authorise the install.

    This seems to have dealt with the symptom of instances of java not closing when the processing sketch quit.

Sign In or Register to comment.