Java Tab doesnt close even after closing Spark 2.8.3

Issue: java tab remains opened even after spark is closed. This happens in both cases when spark is launched through script or through desktop icon.

since spark has to be launched using the script(/usr/share/spark/bin/startup.sh), I created a desktop shortcut to launch spark.

The desktop script I have used is
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/usr/share/spark/bin/startup.sh

Icon=/usr/share/spark/spark_logo.png

I am a novice and please guide me
1.how to ensure the java tab closes when we close spark
2.is it normal for the java tab to popup when we open spark? if not is there any way to avoid it.

What OS? From screenshot i think it is Redhat. I don’t have Redhat machine to test on. I also wasn’t able to install/run Spark on CentOS or Fedora. I’m a Windows user mostly.