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 will start from the very beginning on how I made a Mess!!

I needed Java programming on my Ubuntu 12.04. so, I downloaded Net Beans setup from the site. When I tried to run the setup, I found that JDK is not installed. i Anyway, as I used to do in Windows,(I am a newbie in Ubuntu), I went to Oracle Java site, downloaded the rpm package.

Next, I found that rpm is by default not installed in Ubuntu, so I downloaded rpm too via terminal. When I tried to install jdk setup through rpm, It gave error for installing something named "alien".

Ok!! Now, I installed alien and finally, something happened to the rpm file. Then a message came "jdk1.70.deb generated". Whoa!!! I knew this extension, its an installer file for Ubuntu, I quickly went to the .deb file via nautilus, n doouble clicked it. My software centre showed that it's already installed. N he was right! I found the jdk folder in /usr/java. But still, javac wasnt running!!!

I wrote java -version and it showed that openjdk is being used n not my new setup.

I searched on net, n found this tutorial by webupd8. tried to do this too, changed the java folder as per the guide in site. But now, when I try to run the javac -version on terminal, it gives an error:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

n now, even java -version gives the same error!

I was trying to find out, how to uninstall my newly installed java, but havent found anything. N now, java is not working even on my browsers!

Please help. n get me out of this mess!!! :( :(

share|improve this question
    
Ok, first of all, rewind your steps, and you should have read the warning Warning: JDK 7 is available as a developer preview release, so use it at your own risk.. Now, the last thing you did was changing the java directory, did you followed the next steps? "Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 11.10, 11.04, 10.10 and 10.04):"? –  Braiam Aug 11 '13 at 5:30
    
yes.. I did that too.. but it didnt helped. javac -version and java -version still gave the same errors –  yours.akshit Aug 11 '13 at 6:48
    
Then work backwards, if the thing say move from to, you move to from, if it's says install, you uninstall. –  Braiam Aug 11 '13 at 7:04
    
Hmmm... Thanks @Braiam –  yours.akshit Aug 11 '13 at 12:11

1 Answer 1

This is a better howto for getting Oracle Java7 installed on Ubuntu: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

share|improve this answer

Your Answer

 
discard

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.