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!!! :( :(