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.

Possible Duplicate:
How do I install Oracle Java JDK 7?

I'm running Ubuntu 12.04

I know this has been asked many times but I just recently switched to linux and I'm having a hard time piecing everything together.

I have Oracle's JDK 7 running just fine from the command prompt but I'm not sure what the best way to install eclipse and maven are so that they will use it.

Last time I tried installing eclipse with apt-get and it ended up installing openjdk6.

How do I go about installing eclipse and maven so that they both are using oracle 7 jdk?

Thanks!

share|improve this question
    
there are more than one questions here... please edit it to ask just one. –  Ashu May 20 '12 at 7:21
    
I started a chat room to talk about your problem if you want. It's here: chat.stackexchange.com/rooms/3496/oracle-eclipse-discussion –  hbdgaf May 20 '12 at 8:30
add comment

marked as duplicate by hbdgaf, Jorge Castro, Takkat, jrg May 24 '12 at 18:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers

Pre question edit:

You need to:

I think it's a duplicate question, but you combine multiple questions into one. This violates the ask one question at a time component of the FAQ.

Post question edit:
You would need to look at the questions on installing eclipse and set your launcher to use a terminal so your .bashrc variables get applied. An alternate solution would be to set up the environment variables in .profile. A better alternative is to use update alternatives, but this too is covered in the oracle-jdk question.

It's my opinion that it's still a duplicate despite having narrowed scope.

share|improve this answer
add comment

Use the following command to avoid installation of default-jdk in Ubuntu 12.04 i.e openjdk6
$ sudo apt-get --no-install-recommends install eclipse

share|improve this answer
add comment

I guess you have not set the path correctly

After installing openjdk set the path to the oracle jdk...

JAVA_HOME=/usr/local/java/jdk1.7.0_04 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin JAVA_HOME=/usr/local/java/jre1.7.0_04 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export JAVA_HOME export PATH

This is taken for this link

share|improve this answer
add comment

you can also get it from the ubuntu software centre, and you can also use openjdk6 or 7, you can easily install that with synaptic software centre (sudo apt-get install synaptic) I got eclipse running just fine.

share|improve this answer
add comment

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