Java 6 in today's Ubuntu Release: JDK 6, Glassfish, Netbeans in Repository

by Tim O'Brien

Via this An excerpt from today's LinuxPlanet no longer need to jump through hoops to get up and running with Java on the desktop. It is available in Ubuntu Feisty Fawn (7.04) multiverse repository.

Where do I get started?

Download, install Ubuntu from the Ubuntu site. Here's a link to the Unofficial Ubuntu 7.04 (Feisty Fawn) Starter Guide. Make sure you uncomment the multiverse lines in /etc/apt/sources.list. Then this *should* work:

sudo aptitude install sun-java6-jdk sun-java6-javadb glassfish netbeans5.5

Finally...a real JDK on Linux :-)

This is much more than just another marketing release from Canonical and Sun, making Java a part of the distribution means that you'll see more people adopting and moving towards Java in the future for other application.
Also, it is going to mean that more and more Java open source projects are going to have to start thinking about real packaging issues. I would like to be able to just say "apt-get install continuum" on an Ubuntu box (or "yum install continuum" on Fedora), because what I'm doing right now is getting as far as the distro can take me and then writing 10 page playbook recipes for sysadmins who don't know anything about Java. Getting Sun's JDK in the distro is the bridge we've needed for years.


2007-04-19 12:25:15
Also, it is going to mean that more and more Java open source projects are going to have to start thinking about real packaging issues.

This would be super-cool if the packaging could be done through a Maven plugin.
Tim O'Brien
2007-04-19 12:43:52
There is a maven-deb-plugin, but it is a little creaky - it is in Mojo over at Codehaus. But, it'll be difficult for every Java project to produce the number of packages necessary to satisfy every distro - they all have different ways of dealing with configuration, etc.
Dalibor Topic
2007-04-20 02:00:12
Maven is getting packaged for Debian atm. It's non-trivial in so far that distributions like Debian and Ubuntu have a rule to only have reproducible builds, and that implies that all builds of packages in the distro need to be work offline (i.e. with the package repository from the distro, rather than some internet service like ibiblio).

Maven's offline mode is not yet fully up to that task, among other things, but there is a bunch of patches from Fedora's maven integration work floating around, so it's just a matter of time (and cooling jvz's temper off, as he goes regularly ballistic when some distro approaches the Maven devs about packaging :)

Tim O'Brien
2007-04-20 02:36:04
If anyone is looking for more info on what Dalibor just mentioned, see the thread from Maven's DEV List.

What's shocking to me is to see the total lack of perspective that is expressed from Jason here:

On Redhat would Maven be laid out differently then our stock
install? For documentation, and learning purposes having Maven be
laid out different and work differently on different platforms is not something I would like to see. It will just make it more difficult for Maven users. Maven does more then Java but we are about platform neutrality and having something that works in a specific way on Redhat that doesn't translate to working on OS/X is not a good thing.

Is the discussion even about layout? Why would anyone care if the layout was different? Different distros have different approaches to layout. This is about Java suffering from the idea that developers can't be bothered to think about specific deployment platforms, and it is reasoning like this that makes the platform suffer.

2007-04-20 06:12:24
thkz@thkz-desktop:~$ sudo aptitude install sun-java6-jdk sun-java6-javadb netbeans5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Initializing package states... Done
Building tag database... Done
Couldn't find any package whose name or description matched "sun-java6-jdk"
Couldn't find any package whose name or description matched "sun-java6-javadb"
Couldn't find any package whose name or description matched "netbeans5.5"
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
2007-04-20 11:56:50
Sun Java SDK was on Edgy (6.10) already.
And Eclipse even earlier.

2007-04-20 13:02:30
Instead of editing sources.list you can also use Synaptic:
You might use this to confirm that multiverse really is enabled.
* System -> Administration -> Synaptic Package Manager
* Settings -> Repositories
* Check the "Software restricted by ... (multiverse)" checkbox
* Edit -> Reload Package Information

Then the commandline should work. Or search for "sun-java" in the name and install from Synaptic.


2007-04-24 14:50:34
hot diggity
2007-04-24 23:05:46
It works now. Thanks..
Tim Taylor
2007-04-27 01:02:56
instead of apt-get you should use aptitude
Tim O'Brien
2007-04-27 07:52:40
@Tim Taylor,

Surely, we all hold on to our old habits.

2007-04-27 08:34:40
The "LinuxPlanet article" link is broken... thanks!
Tim O'Brien
2007-04-27 08:44:05
@YAChris, thanks for the catch, I just fixed it.
John Wagner
2007-04-28 08:31:33
There have been "real" SDK's on linux for quite sometime (like, years). Installation is/was as easy as unpacking a tarball - not much to it really.
Tim O'Brien
2007-04-28 08:57:56

You attitude is similar to what most Java programmers think of integration and deployment. "Well, it's easy just download this package and unzip it in a directory". Integration with Linux is much more than telling a sysadmin what to do with a JDK tarball, it is making it as effortless as installing Apache 2.2 on a Fedora Core box or installing emacs via yum.

Until we start thinking about making it easier for sysadmin, Java will continue to be a "developer's technology", and I think that Sun realizes that, if Java is going to survive, it has to serve the market as it is.

Saying, "well there's been a JDK for a while, and unpacking a tarball is easy" seems to miss the point entirely.

Steve Michael
2007-05-03 11:59:42
Thanks for the info! I am really wanting to get a new machine and have been debating between a new Mac Pro and a custom built system. I want to go with the custom built machine but I am a Java developer and have tried to get NetBeans + VWP to run before on Linux with NO LUCK. This install is exactly what was needed and other than me having to download the netbeans 5.5 compressed file and put it in my /tmp directory it worked very well.

Now the big news... I actually installed the visual web pack and it launched tomcat and my simple JSF page. I can't tell you the issues I had before with it sitting there and never loading, or me having to try and find some freaking RPM file that was a different version. These types of issues always drove me back to Windows for development and I am a Linux fan.

To the other guy out there. Yes I have ran Eclipse before with Fedora/Redhat but ran in to major issues because they use some weird ass version that is compiled and I never could get MyEclipse to load. It probably can work, but I don't want to go through a major science project every time I want to install software. I am not sure if Ubuntu does the same thing or not, but my issue with Ubuntu was that it locked most of the programs to either GCJ or some other wierd Java. I would try and remove it and it would have TONS of things hooked to it. I just wanted all the things that used Java to use Suns 1.5 Java and this appeared to be yet another science project...

So thanks again, and I agree with your post. It needs to get as easy as Windows to install and setup for a developer and this is a GIANT step in the right direction.

2007-07-16 16:20:11
Steve Michael:

It sounds like your issue with Java "hooks" may be resolved by running "update-alternatives"--I suggest giving that a try.

2007-07-27 19:06:32
how do i download java from ubuntu server?
2007-11-05 00:45:12
I just moved to ubuntu and i was really surprised at the java's speed compared to windows. It's just a bit of a bummer that glassfish 2 didn't make it in 7.10. It's still great though.
2008-08-03 23:54:03
ello i am vijay nalawade i use ubuntu 7.10.i install jdk1.6 in home/jdk folder.then installed neatbeans..the error message are encountered donot found jdk...give me solution for this..