1

I've been trying this tutorial:
How To Manually Install Oracle Java on a Debian to 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.

I need to get Oracle Java 8 installed.

0

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):

Basically:

  1. Install java-package (apt-get install java-package).
  2. Download (but don't install) the Oracle Java package from the Oracle site.
  3. Use make-jpkg to build a package from the Oracle Java installer you've downloaded.
  4. 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.

|improve this answer|||||
  • Awesomely well guided I am. Thank you very much. – Tower Jul 16 '15 at 9:08
0

java-package is of course a better idea.

For now, your problem can be related to permissions.

chown <current_user>:<whichever_group> /opt/jdk/jdk1.8.0_05/bin/java where current_user is the user you want to run java with (can be root) and chmod -R 755 /opt/jdk/jdk1.8.0_05

And then try.

|improve this answer|||||
  • I'll surely give this a try too. Thanks for reminding me about the problem I always have with permissions ;) – Tower Jul 16 '15 at 9:10

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.