Search code examples
javawindowsyajsw

YAJSW is creating two java.exe processes


I'm currently using YAJSW to wrap a java application that I've developed. For some reason I see it is creating two java.exe processes (I see it in the windoes task manager : 1 : "C:\Program Files\Java\jdk1.7.0_72\bin\java.exe" "-classpath" "D:\yajsw-stable-11.04\wrapper.jar" 2: "C:\Program Files\Java\jdk1.7.0_72\bin\java.exe" -classpath /D:/yajsw-stable-11.04/./wrapperApp.jar) . When I start the application not as a service - only one java.exe process is being created. meybe the problem is in the use of wrapper.working.dir . this property point to my application binary . is it ok ? Any idea why is this ?


Solution

  • This is normal when starting your process as a service using YAJSW. When the service starts, it first starts a process with a low memory footprint, that is the YAJSW wrapper process, used to monitor your application process. Then, it forks another process that is your actual program. You will notice that when you shutdown the service, both will terminate normally. Finally, you can tell your process either by the amount of physical memory used, or by setting the processID within the YAJSW configuration.