After the start of an application (java.exe process) the launching process (javaws.exe) stays running and consuming memory,
see attached screen shot.
Is this on purpose or by accident?
javaws.exe stays running
-
bm-printforce
- Posts: 2
- Joined: 03 Jul 2025, 15:54
javaws.exe stays running
- Attachments
-
- javaws2.png (28.36 KiB) Viewed 503 times
-
Janak Mulani
- Posts: 1088
- Joined: 24 Mar 2020, 13:37
Re: javaws.exe stays running
OWS launches your Jnlp application in a separate process with the JVM that best matches the one you have specified in the Jnlp file. You need to make sure that when you close the main frame of your application System.exit() is called to terminate the currently running Java Virtual Machine (JVM) and consequently, the entire Java application.
-
bm-printforce
- Posts: 2
- Joined: 03 Jul 2025, 15:54
Re: javaws.exe stays running
I think, there has been a misunderstanding.
My question is:
why does javaws.exe not terminate immediately after the start of the jnlp application?
My question is:
why does javaws.exe not terminate immediately after the start of the jnlp application?
-
Janak Mulani
- Posts: 1088
- Joined: 24 Mar 2020, 13:37
Re: javaws.exe stays running
OWS runs in two stages. In the first stage OWS is started with the Java 1.8 JVM that is bundled with the installer. In Stage I, OWS processes the Jnlp file and determines which JRE to use to start the application. In the second stage, OWS uses the JRE that best matches the one specified in the Jnlp file to start a new process that processes the Jnlp file again, downloads the resources and invokes the main class of the application specified in the Jnlp file. The application runs in that same java process. Thus OWS does not terminate till the application's main window is closed and terminates the process (System.exit()).