LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-10-2006, 01:31 PM   #1
Carunkumar
Member
 
Registered: Sep 2006
Location: chennai
Distribution: fedora core 8
Posts: 106

Rep: Reputation: 15
help to install jdk


I need to create and execute small java programs.Can anyone help me install the jdk??

I didn't find a version for ubuntu

please help!

-C Arunkumar .
 
Old 10-10-2006, 09:36 PM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
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.

I hope this helps
--Ian
 
Old 10-10-2006, 11:00 PM   #3
Carunkumar
Member
 
Registered: Sep 2006
Location: chennai
Distribution: fedora core 8
Posts: 106

Original Poster
Rep: Reputation: 15
Tried the first method you told me.

when i used the command i got the following lines.

root@Carunkumar:/home/carunkumar# aptitude install sun-java5-jdk
Reading package lists... Done
Building dependency tree... Done
Initializing package states... Done
Building tag database... Done
Couldn't find any package matching "sun-java5-jdk". However, the following
packages contain "sun-java5-jdk" in their description:
sun-java5-bin sun-java5-jre
The following packages have been kept back:
acpi-support app-install-data app-install-data-commercial base-files
bind9-host binutils-static capplets-data cpio cupsys cupsys-bsd
cupsys-client deskbar-applet desktop-file-utils dnsutils eog evince
file-roller firefox firefox-gnome-support flashplugin-nonfree gdb gdm
gedit gedit-common gimp gimp-data gimp-python gnome-about
gnome-accessibility-themes gnome-app-install gnome-applets
gnome-applets-data gnome-control-center gnome-desktop-data
gnome-doc-utils gnome-games gnome-games-data gnome-media gnome-menus
gnome-panel gnome-panel-data gnome-screensaver gnome-session
gnome-terminal gnome-terminal-data gnome-themes gnupg gstreamer0.10-alsa
gstreamer0.10-gnomevfs gstreamer0.10-plugins-base
gstreamer0.10-plugins-base-apps gstreamer0.10-x gtk2-engines-clearlooks
gtk2-engines-crux gtk2-engines-highcontrast gtk2-engines-industrial
gtk2-engines-lighthouseblue gtk2-engines-mist gtk2-engines-pixbuf
gtk2-engines-redmond95 gtk2-engines-smooth gtk2-engines-thinice
gtkhtml3.8 gzip language-pack-en language-pack-en-base
language-pack-gnome-en language-pack-gnome-en-base language-selector
language-selector-common libbind9-0 libcupsimage2 libcupsys2 libdns21
libeel2-2 libeel2-data libfreetype6 libgd2-noxpm libgimp2.0 libglib2.0-0
libglib2.0-data libgnome-desktop-2 libgnome-menu2 libgnomecups1.0-1
libgnomeprint2.2-0 libgnomeprint2.2-data libgnomeui-0 libgnomeui-common
libgnomevfs2-0 libgnomevfs2-bin libgnomevfs2-common libgnomevfs2-extra
libgnutls12 libgstreamer-plugins-base0.10-0 libgtk2.0-0 libgtk2.0-bin
libgtk2.0-common libgtkhtml3.8-15 libgtksourceview-common
libgtksourceview1.0-0 libisc11 libisccc0 libisccfg1 libkrb53 liblwres9
libmagick9 libmetacity0 libmono0 libmysqlclient15off libnautilus-burn3
libnautilus-extension1 libnspr4 libnss3 libpanel-applet2-0 libpango1.0-0
libpango1.0-common libpq4 libsmbclient libsoup2.2-8 libssl0.9.8
libtag1c2a libtheora0 libtiff4 libtotem-plparser1 libvte-common libvte4
libwmf0.2-7 libwnck-common libwnck18 libxfont1 linux-386 linux-image-386
linux-restricted-modules-386 linux-restricted-modules-common login
metacity mono-classlib-1.0 mono-common mono-jit mysql-common nautilus
nautilus-cd-burner nautilus-data openoffice.org openoffice.org-base
openoffice.org-calc openoffice.org-common openoffice.org-core
openoffice.org-draw openoffice.org-evolution openoffice.org-gnome
openoffice.org-gtk openoffice.org-impress openoffice.org-java-common
openoffice.org-l10n-en-us openoffice.org-math openoffice.org-writer
openssh-client openssl passwd pcmcia-cs pmount ppp python-gmenu
python-pyorbit python-uno python-vte python2.4 python2.4-examples
python2.4-gdbm python2.4-minimal python2.4-pyorbit python2.4-tk readahead
samba-common smbclient sound-juicer ssh-askpass-gnome totem
totem-gstreamer ttf-opensymbol ubuntu-base ubuntu-desktop ubuntu-docs
ubuntu-minimal ubuntu-standard wpasupplicant xserver-xorg-core
xserver-xorg-input-mouse yelp zenity
0 packages upgraded, 0 newly installed, 0 to remove and 191 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
root@Carunkumar:/home/carunkumar#



But am not able to find jdk in my synaptic package manager nor I am able to run it.

what is the difference between apt-getand aptitude?


Thank you for you help!

-C Arunkumar
 
Old 10-10-2006, 11:33 PM   #4
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Try: "apt-cache search sun-java5-jdk" and see what shows up. Have you added the "multiverse" repository and run apt-get update?

As for apt-get v aptitude, try [URL="http://www.psychocats.net/ubuntu/aptitude"]This[URL] page for an excellent description.

--Ian
 
Old 10-11-2006, 12:59 AM   #5
Carunkumar
Member
 
Registered: Sep 2006
Location: chennai
Distribution: fedora core 8
Posts: 106

Original Poster
Rep: Reputation: 15
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!





-Arunkumar C
 
Old 10-11-2006, 12:38 PM   #6
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Rep: Reputation: 32
Additional hints (for the command line) (check them at any rate!):

Quote:
which java

sudo update-alternatives --config java

echo $JAVA_HOME
export JAVA_HOME = /path/to/jdk

echo $CLASSPATH
export CLASSPATH = /path/to/jdk/lib:/path/to/jdk/jre/lib/ext
My $HOME/.bashrc file (which gets interpreted everytime I logon) looks like that:
Quote:
export PATH=/usr/lib/j2sdk1.5-sun/bin:$PATH
export JAVA_HOME=/usr/lib/j2sdk1.5-sun
export CLASSPATH=/usr/lib/j2sdk1.5-sun/lib:/usr/lib/j2sdk1.5-sun/external-jars:/usr/lib/j2sdk1.5-sun/jre/lib/ext
export JBOSS_HOME=/media/hde1/home/robert/opt/jboss-4.0.4.GA
 
Old 10-12-2006, 07:18 AM   #7
Carunkumar
Member
 
Registered: Sep 2006
Location: chennai
Distribution: fedora core 8
Posts: 106

Original Poster
Rep: Reputation: 15
Thanks for you helpnewbie: .But I didn't understand the commands you posted.
What is it used for?


-Arunkumar C
 
Old 10-12-2006, 08:14 AM   #8
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
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...
 
Old 12-22-2006, 11:44 AM   #9
Carunkumar
Member
 
Registered: Sep 2006
Location: chennai
Distribution: fedora core 8
Posts: 106

Original Poster
Rep: Reputation: 15
Thanks a lot!
 
Old 12-23-2006, 11:33 PM   #10
snowman81
Member
 
Registered: Aug 2006
Location: Michigan
Distribution: Ubuntu
Posts: 282

Rep: Reputation: 30
I don't know if Easy Ubuntu (I think that's the name) has it but I know Automatix2 does. Even has a GUI now.
 
Old 12-24-2006, 05:35 PM   #11
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
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.
 
Old 12-25-2006, 01:22 AM   #12
Carunkumar
Member
 
Registered: Sep 2006
Location: chennai
Distribution: fedora core 8
Posts: 106

Original Poster
Rep: Reputation: 15
Thank you!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i can't seem to install jdk 1.5.bin jadewarrior Ubuntu 2 09-28-2006 05:29 PM
Would like to install jdk 1.5 bin jadewarrior Red Hat 2 06-29-2006 02:48 AM
Install JDK on Mepis tuxhats MEPIS 10 06-07-2006 08:14 AM
How to install Jdk in linux... Help me :( jolly Linux - General 9 09-13-2001 01:57 PM
JDK binary file install marknyhan Linux - General 2 08-13-2001 12:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration