I know there are many similar post on here regarding issue i am having and trust me I have tried most of them and did not solve my issue.
I am trying to uninstall all the JDK files installed in my ubuntu. I want to do that because I heard that netbeans is keep crashing when i trying to open it and I get to know that netbeans have some issue with JDK-9 so i want to install JDK and want to re-install may be JDK-8
To remove OpenJDK-9 which i have in my system I have tried below commands so far.
sudo apt-get autoremove openjdk-9-jre-headless sudo apt-get remove default-jdk sudo apt-get purge openjdk-9-jre-headless gcj-4.9-jre-headless
but no luck, every time I run those commands I get below or similar message
This is what i get when I run java-version to check what version of jdk i have
I will appreciate your help if you can show me steps to remove all JDK and all related files to JDK.