Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
  • I can't use openjdk because it doesn't have native .jpg support.
  • I can't use sudo apt-get install sun-java6-jre sun-java6-plugin any more because apparently those have been pulled.
  • JRE version 7 works, but the only way I've found to get it is to accept the terms of service ON THEIR WEBSITE and I need to install Java ON MY SERVER where I only have command line access.

Throw me a fricken bone here Java!


It just dawned on me that I can download the .tar.gz on my desktop computer and scp it over to the server. Who put me in charge?!

share|improve this question

1 Answer 1

Just download the tarball and then install it. On a Debian or Ubuntu system I would install it to /usr/lib/jvm/XXX and run update-alternatives:

cd /usr/lib/jvm
tar -xzf /path/to/java_tarball.tar.gz
update-alternatives --remove-all java
update-alternatives --remove-all javac
update-alternatives --install /usr/bin/java java /usr/lib/jvm/YOURJAVA/bin/java 1000
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/YOURJAVA/bin/javac 1000

You don't have to run the --remove-all part, in that case make sure the number "1000" is higher than the current one it's set to, which can be found with:

update-alternatives --display java (or javac)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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