Uninstall java

i want to uninstall java which I downloaded and want to reinstall it and i have deleted all my java files but still when I type ‘java --version’ in my terminal it shows me the java version. Someone please help me to uninstall Java from my mac.

Hey nabeelkhann, I believe there isn’t a straight forward framework like solution at the moment but if you don’t mind, you can refer to the following stackoverflow link for your reference to see if it help in anyways.

https://stackoverflow.com/questions/19039752/removing-java-8-jdk-from-mac

Cheers!