2

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!

Talon876
  • 129
  • there are more than one questions here... please edit it to ask just one. – Ashu May 20 '12 at 07:21
  • I started a chat room to talk about your problem if you want. It's here: http://chat.stackexchange.com/rooms/3496/oracle-eclipse-discussion – RobotHumans May 20 '12 at 08:30

4 Answers4

2

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.

RobotHumans
  • 29,530
1

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

bitsbuffer
  • 1,287
0

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

AurA
  • 363
0

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.

Dr_Bunsen
  • 4,713
  • 4
  • 28
  • 40