OpenJDK continues running after closing Android emulator
1,653
The JVM Process Status Tool helped me identify why OpenJDK was not closing. Running [path_to_jre]/bin/jps -l
in terminal spat out the following:
2272 org.gradle.launcher.daemon.bootstrap.GradleDaemon
4500 sun.tools.jps.Jps
The solution I landed on is to create a task in VSCode:
...
{
"label": "gradle --stop",
"type": "shell",
"command": "C:\\Gradle\\gradle-6.1.1\\bin\\gradle --stop",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": []
},
...
This results in the OpenJDK process ending.
Author by
moatist
Updated on December 17, 2022Comments
-
moatist over 1 year
Problem
I am using VS Code to edit and run Android projects. The emulator will open and I see the program
OpenJDK Platform binary
start, followed by the program compiling and running. However, after closing the Android emulator and VS Code, OpenJDK continues to run.(Task manager after closing Emulator/VSC)
Solution?
Is this normal behavior? Is there a way to have OpenJDK JRE shut down after the emulator/VSC exits?
My main concern is battery life as I am using a laptop.Extra Information
System: Windows 10 Pro (1909)
Visual Studio Code version: 1.42.0Notes
- I am using the Flutter framework for Android development
- Intel Optane memory is enabled
- The emulator & JRE being used are from the Android Studio bundle
-
moatist about 4 yearsI could use a script to kill the process. By why does it not close automatically once not being used?