2

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

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

enter image description here

I will appreciate your help if you can show me steps to remove all JDK and all related files to JDK.

1
  • 5
    All the messages have said you don't have JDK installed. As far as I can tell, your question is already resolved. – edwinksl Jun 11 '16 at 0:24
6

You have it removed. Bash is just telling you, hey, if you want to run java, here are the packages you can install. Try running which java. If no output, then you don't have any JDK installed. You can install any one of the packages suggested.

3
  • I try running $ which java and it just do nothing. so do you mean to say at the moment I do not have any JDK file installed? @user41609 – Shyam Bhimani Jun 11 '16 at 0:01
  • 2
    @ShyamBhimani Exactly. It's already gone from your system. The message you saw indicates that you can install it by installing one of those other packages it lists. You don't have Java installed, so your issue is already resolved. – Thomas Ward Jun 11 '16 at 0:40
  • @ShyamBhimani Yes, you do not have java or any JDK installed. By default, bash uses a program called command-not-found when a command is, well, not found. This program, command-not-found, simply tells you the package names of packages you can install which contain the "java" command. Thus the "'java can be found in the following packages:" – daboross Jun 11 '16 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.