Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How can I install Sun/Oracle's proprietary Java 6/7 JRE or JDK?

I am new to Linux and i used instruction specified in Oracle's documentation on how to install Java on Linux. Now when i checked with Java -version i got invalid command message.

After searching in different directories i found java directories in Downloads folder. Please suggest what should i do a new install or any other option?

share|improve this question

marked as duplicate by Jorge Castro, John S Gruber, andrewsomething, ajmitch, jokerdino Aug 22 '12 at 8:07

This question was marked as an exact duplicate of an existing question.

up vote 0 down vote accepted

Go to software center and search java 7 for the latest version and click install it will install properly.

Sticking to software center or using apt in terminal is the best way to install.

share|improve this answer
But i can only see Open JDK 7, what if i want to use Oracle JDK? – Dan Aug 12 '12 at 11:50
Im no expert in java but a quick Google gives me the impression they are the same thing ? Dont know this as a fact but try it. – Mark Kirby Aug 12 '12 at 11:53
yep Open JDK 7 seems to be perfectly fine, i will be using it as of now. Once i get better with ubuntu i will try Oracle one. Thanks – Dan Aug 12 '12 at 11:57
Glad to help :) – Mark Kirby Aug 12 '12 at 11:59

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