Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an ubuntu system and I want to replace my openjdk with oracle-jdk.

However if I remove my open-jdk and then install oracle-jdk, when I try to install some packages they want to install openjdk and I don't want this.

Is there any way to install those packages on top of oracle-jdk? One of those packages is freemind.

share|improve this question

migrated from stackoverflow.com Mar 6 at 17:22

This question came from our site for professional and enthusiast programmers.

Which packages require open-jdk that you want to install? (besides freemind) –  Seth Mar 6 at 17:24

2 Answers 2

You don't need to remove openjdk in order to use / install the oracle's jdk. Just install the oracle's jdk and configure which java you want to use by configuring it with:

sudo update-alternatives --config java

You can find more help here: https://help.ubuntu.com/community/Java

share|improve this answer
I need a way to have only one java on my ubuntu. tnx. –  little ali Mar 6 at 11:48

After removing openjdk, try this approach that worked for me:

Install oracle jdk 7 on ubuntu server (tested with ubuntu 12.0.4)

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

some more info here: https://launchpad.net/~webupd8team/+archive/java

(note to adapt this for your version of jdk)

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.