I've been trying this tutorial:How To Manually Install Oracle Java on a Debianto install Java on Debian 8, but I'm getting the following error :update-alternatives: error: alternative path /opt/jdk/jdk1.8.0_05/bin/java doesn't exist I checked the directory and observed that the directory actually exists. The output of the ls command is as follows: -rwxr-xr-x 1 uucp 143   5730 Apr 10 13:53 java I don't know how to solve my problem and fix my Java installation. I've checked about what uucp actually means but have no idea why it's there. Would you kindly help me to get Oracle Java 8 installed?
update-alternatives returns error about Java directory not available
debian;directory;java
You'd be far better off using the Debian java-package package to install Oracle Java. It allows you to build a Debian package file from the Oracle Java binaries, a package that can be managed using the regular Debian tools (including update-alternatives).For Debian 8.x, the currently supported Java versions are (from here):Oracle (http://www.oracle.com/technetwork/java/javase/downloads) :    The Java Development Kit (JDK), version 6, 7 and 8The Java Runtime Environment (JRE), version 6, 7 and 8The Java API Javadoc, version 6, 7 and 8Basically:Install java-package (apt-get install java-package).Download (but don't install) the Oracle Java package from the Oracle site.Use make-jpkg to build a package from the Oracle Java installer you've downloaded.Install the Debian package you built as part of step 3.For more information, see here (currently slightly out of date) and the make-jpkg manual page.Note: Make sure you remove the Oracle Java binaries you manually installed before installing the package you built with make-jpkg, otherwise you are sure to run into problems.