0

I'm using robotframework 3.0. installed Sikuli library from source using maven. When I run a script SikuliLibrary.jar is started, even after script execution is completed the java process is still running. Next time when I run the script again a new process is created. I'm facing this issue in both Linux(RHEL) and Windows.

I will be running multiple scripts repeatedly and because of this issue RAM is getting filled with java processes.

Here are the java processes from linux server

root 21509 1 0 08:59 pts/26 00:00:16 java -jar /usr/jython/Lib/site-packages/SikuliLibrary/lib/SikuliLibrary.jar 55994 /tmp/xtttrrr
root 21769 1 0 11:27 pts/32 00:00:17 java -jar /usr/jython/Lib/site-packages/SikuliLibrary/lib/SikuliLibrary.jar 59637 /tmp/xtttrrr
RealSkeptic
  • 33,993
  • 7
  • 53
  • 79
Kranti Kumar
  • 325
  • 2
  • 6
  • 16
  • Does the same happen if you run it directly (not from the script)? Is your Java program issuing `System.exit(someStatus)`? If it starts non-demon threads that don’t stop, it would need to. This would usually be the case if you use Swing, and also in very many other situatoins. – Ole V.V. Sep 08 '16 at 11:35
  • Same output/result happens if we run it directly. – Kranti Kumar Sep 09 '16 at 01:25
  • So in your Java program either make sure that all threads either stop or are demon threads (nearly impossible in a complex program). Or use `System.exit(0)` when the program has done the work it should (easy). There is sometimes frowning on `System.exit()`, but I think this just reflects it is often misused. I certainly think it has its place here. – Ole V.V. Sep 09 '16 at 05:17
  • More on demon threads: [What is Daemon thread in Java?](http://stackoverflow.com/questions/2213340/what-is-daemon-thread-in-java). More on exiting a Java program: [When should we call System.exit in Java](http://stackoverflow.com/questions/3715967/when-should-we-call-system-exit-in-java). Please continue searching on your own. – Ole V.V. Sep 09 '16 at 05:22

0 Answers0