UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
I think Java is in the "Multiverse" repository. In the /etc/apt/sources.list, find the line referring to the Universe repo, and add the word "multiverse" at the end.
Run "sudo aptitude update", and then you should be able to install the JDK using: "sudo aptitude install sun-java5-jdk".
If that doesn't work, I have instructions Here. Follow the Debian specific instructions, which should work on Ubuntu. Make sure you download the ".bin" from the Java website, not the rpm.
sorry I hadn't added the multiverse in the right place.I was able to install it using the same command after adding it.Thanks a lot for the help and the link!
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
1) "which java" - gives the path the the command java. In some cases, you may have several executables called "java" and this command tells you which one you are executing.
2) See "man update-alternatives" for a good description.
3) The next commands simply print (echo) the value of the environment variables "$JAVA_HOME" and "$CLASSPATH". They should be set correctly if you installed using the package.
4) The export commands let you set these environment variables if necessary, though I wouldn't bother with this at the moment.
5) Your ~/.bashrc is a config file that is read everytime you start a new shell (that is not a login shell). Those lines will set those environment variables to the correct values when you start a shell. Don't worry about this though, they should be set correctly by the package installer.
I hope this helps
--Ian
PS: Google would have given you good answers to all of these...
Java5 installs easily with the Synaptic Package Manager. No command line required. There are also a number of development environments. Eclipse is a popular one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.