Q&A for How to Set Up Your Java_Home Path in Ubuntu

Return to Full Article

Search
Add New Question
  • Question
    Step 8 says to "export PATH ." Should I include the "."? There is no "." in Step 6.
    Top Answerer
    You should not include the trailing period.
  • Question
    What should I do if my path is showing JAVA_HOME=/usr/lib/jvm/java-8-oracle?
    Community Answer
    Then Java is already installed in your system. You can change the current JAVA_HOME if you want to update it.
  • Question
    How do I update Java using a command?
    Pingu
    Top Answerer
    If you installed Java from APT, as is usually done on Ubuntu, you need to find which exact Java package you installed first. It's usually either some Oracle JDK or GCJ. You can use "dpkg --get-selections" to list all packages and the "grep" command to find the package in it. Then, you should write "sudo apt-get install --only-upgrade packageName", with packageName being the name of the package you found.
  • Question
    How do I know if my Java home path in Ubuntu is set up correctly?
    Community Answer
    Type 'echo $JAVA_HOME' into the terminal and it should give you the correct path.
Ask a Question

      Return to Full Article