OpenJDK in Ubuntu or Android Eclipse

Go To StackoverFlow.com

0

I am new to OpenJDK. Should I install OpenJDK in Ubuntu or is OpenJDK already available in Android Eclipse that I am presently working in? If no, then how do I go about installing the OpenJDK in Ubuntu. Please help me.

2012-04-04 04:36
by celebrate celeb
Check output of dpkg -l 'openjdk*' to see if you've already got it installed - sarnold 2012-04-04 04:45


1

You can install openjdk by running sudo apt-get install openjdk-7-jre, (jdk 7). However if you have a working eclipse installation for Java programs chances are that you already have java installed on your machine.

Now to verify it there are following three ways:-

  1. Run javac/ java from command line.
  2. Manually check the /usr/lib/jvm folder.
  3. In Eclipse Go to Window -> preferences -> Java -> installed JREs and see The path of listed JREs there if any .....

Hope it helps!!!

EDIT 1 Eclipse is an IDE which helps you in developing applications in various programming languages and Java is just one of them, when you install eclipse it checks whether you have any installed JREs in your system. If the installer can't find any JRE than it gives you a message for that. If it finds any JRE than it takes the path to that JRE and configures itself accordingly.

On the other hand OpenJDk is The place to collaborate on an open-source implementation of the Java Platform, Standard Edition, and related projects. You also have sunjdk (oracle's implementation) and many more. For more information about openJdk refer the link.

One more thing you can install multiple JREs in your machine and choose which one you want to use for any project.

2012-04-04 04:45
by Amit
Thanks. I checked. My Eclipse has JREs. But I want to know if OpenJDK should be installed or I can work in Eclipse environment itself - celebrate celeb 2012-04-04 05:17
Does OpenJDK work only in Ubuntu or does it come default in Eclipse? I am so confused since I am not finding proper info in net. Please hel - celebrate celeb 2012-04-04 05:21
please see the edit...for more information about openJDk see related questions here or google it. Most of us do the same.... cheers!! - Amit 2012-04-04 07:30
thanks rahul.. I am installing Vmware player then downloading OpenJDK then installing Java Eclipse again. I guess it will wor - celebrate celeb 2012-04-04 09:54


0

You may also use the command sudo update-alternatives --config java to see java alternatives currently installed on your machine.

Hope this helps. Good luck!

2012-12-28 14:37
by Zorayr
Ads