The Source for Java Technology Collaboration
User: Password:



Kirill Grouchnikov

Kirill Grouchnikov's Blog

Feisty Fawn, Sun's JDK and the latest Eclipse

Posted by kirillcool on April 22, 2007 at 05:07 PM | Comments (12)

The latest barrage of announcements from both Ubuntu and Sun's camp finally made me reconsider my position from two years back, and i decided to give Linux a chance. After downloading the ISO file for Feisty Fawn and burning it with Nero, i naively thought that i could just install it from within Windows. That is not so - the disk should be chosen at the boot sequence, and this is the first major obstacle for non-IT people (i'm not sure if this can be technically managed). I was quite scared to play with the boot BIOS settings, since i have quite a few important files on my XP box. So, i popped in a blank DVD, made a quick backup and asked my wife to not be too angry at me if the pictures of our baby daughter and her work-related files will no longer be there in a few hours (this didn't happen, so hooray for Ubuntu).

Next, hitting Delete key during the boot, fiddling with the CD / DVD and the main boot menus, restart and voila - i have the main Ubuntu menu. Select "Start from CD" and... Get greeted with the "Can't read CD" message. Wait - where did the Ubuntu menu come from? Restart a few times, get the same message. Revert back to trusty Windows XP, browse the net and discover that i should select slower speed for burning the CD. Say what? I've burned hundreds of CDs and DVDs on this box, and this is the first time i get such an advice. Oh, well, might as well try it. Switch back from 32x to 16x setting in Nero, burn another CD (which has effectively doubled the total cost of installing Ubuntu, not to mention that i had to go to the Fry's and buy a brand new pack of blank CDs - who's using CDs any more, and why can't you burn an ISO image to a DVD...)

Now Ubuntu was nice enough to start in the live mode which is oh so horribly slow. It took about 10 minutes to install (after downloading) the JDK (as compared to a few seconds on the installed Ubuntu), and this is with 512MB RAM. The screen is third of an inch off to the right, and there are quite a few visual artifacts during the boot (i'm on geforce 5500). But - it recognized my internet connection, so what are a few pixels when you don't need to configure the modem? After the above-mentioned 10 minutes of installing the JDK it eventually failed (i don't remember the message) and i finally mustered some courage to install Ubuntu.

Click on the Install icon, get greeted with a not-so-bad installer, up until it gets to the partition screen. What do we have there? A cryptic slider with a not-so-easy-to-understand purpose. Where is it going to create a partition? How do i say to it "take 8 GB from this drive"? It was hard for me to understand, and i'm sure it's way over the head of a non-IT person. Well, back to XP and trusted Partition Magic. Create a new drive with 8 GB and back to Ubuntu. Select manual mode, get a cryptic dialog to create partitions, try a few times, get stuck in the middle (somehow Ubuntu let me open two modal dialogs so had to reboot), try a few options, cross fingers, get a little help in selecting the partition type ("NTFS is not supported, select some other type such as ext2" for a list of about 12 options. Well, if you want ext2, why not select it yourself?) and finally the install starts.

Once Ubuntu starts, the installer (apt-get) is a god-sent gift. Sun's JDK and CVS were installed in a few minutes, and then i decided to install Eclipse. No biggie - "sudo apt-get install eclipse" and it goes and fetches the latest 3.2.2 release. But wait, it resets GCJ as the default Java binary. What's the solution? Apparently, all you need to do is fire up Synaptic and remove gcj. It would be nice, but unfortunately it also goes and removes Eclipse. Catch-22. Sigh. But wait, there's a solution!

Go to eclipse.org, click download (and it's nice enough to recognize that you're on Linux) and download the latest .tar.gz. Once it's on your machine, unzip it somewhere and now you're ready to run Eclipse. One catch is that if you type "eclipse" in the terminal, it says that it doesn't have it. So, you'll either have to add "." to the path, run "./eclipse" or create a shortcut in the top toolbar (or whatever it's called). Right-click, select "Add to panel", select "Custom application launcher", select eclipse (wherever you installed it) and you're done. Almost. What an ugly icon (or the lack of thereof). Right click on the shortcut, select "Properties", click on "No icon", browse to the eclipse install folder and select "eclipse.xpm". Now, you're done. When you launch Eclipse, it'll pick Sun JDK 6.0 by default (instead of GCJ).

Last thing - Ubuntu is nice enough to assume that it should be the default OS during the boot. If, like me, you currently see it as a minor OS to be used for debugging OS-specific issues, follow these instructions to reset your Windows as the default OS (to keep you and, most importantly, your wife, happy).

Disclaimer - this is my first day with Linux (but most certainly not my first with UNIX environment - that i had plenty, about 9 years). There might be easier ways to do what i did, there might be mistakes in my advice, but this is an honest recollection of the last 12 hours of my life (and i wonder if 150$ that i paid for the pre-installed Vista were spent wisely, considering the time spent on Ubuntu and the general hourly wages in the IT industry, not to mention that some laptop vendors void the warranty if the problems you're having are caused by installing an alternative OS)


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • I hope this reply doesn't come off as combative, but your post does sound a bit critical, so I hope you can deal with a little critical feedback.

    1) For the non-technical, Ubuntu will ship a CD directly to your house, free of charge. That's about as easy as it gets. I'm not sure you can put down Ubuntu for the difficulty of burning an ISO because you chose to do it yourself.

    2) Errors in properly burning an ISO are a failure of Nero or your burner hardware. I'm not sure I understand the criticism directed at Ubuntu. You may have had a bad burn for other reasons, and coincidentally it went fine the second time (at 16x). And, as I said, you could've received it in the mail instead.

    2) Most computers come with booting from removeable media turned on by default. Usually you have to be geeky and go into the Bios and turn this off to end up in the situation you were in (so, presumeable, you'd know how to change it back). I would criticize your manufacturer for not doing so if you weren't the culprit here. They are breaking everyone's ability to run an alternative OS, or to easily reinstall Windows in case of a critical failure.

    3) Running Eclipse with GCJ doesn't mean that your project must run under GCJ. You can set any JDK you want inside Eclipse for your projects to be compile and run with. Do you care which version of C your text editor is running on when you edit HTML? At any rate, you can set your default version of Java using "update-alternatives", usually by doing "update-alternatives --list java" and from the list, picking the right JDK, and doing "update-alternatives --set java /some/path/to/JDK". I'd be the first to agree that this last step isn't very easy. An easier solution, once you've removed GCJ and installed java (sudo apt-get install sun-java6-jdk), you will be able to get Eclipse without GCJ (it can depend on GCJ or any sun-java).

    4) You can't install any operating system from inside another operating system (except when using emulators like VMWare and QEMU). I don't know how you would expect Ubuntu to make this happen. The only bullet proof answer would be for manufacturers to preinstall it, which it sounds like Dell is working on.

    Posted by: carpediem on April 22, 2007 at 06:10 PM

  • Kirill,

    For experimentation, you might consider installing VMWare (they have a fully functional 30-day demo). I wanted to try ubuntu (and needed a linux environment I could easily tweak without fearing side effects), but did so through VMWare workstation, which only required allocating some hard drive space (normal file, no new partitions). No danger to the w32 laptop or its files, and if the new OS wipes or corrupts its "disk", I'm no worse for the effort.

    It ended up working rather well, and I was able to kick out some alpha-masked java windows on linux in no time.

    Still not sure if I want to plunk down the $200US for a VMWare license, since the network provided to the ubuntu system keeps dropping out, but it was certainly worth the free evaluation. I'd have no hesitation buying it if it weren't for the network issue.

    Posted by: twalljava on April 22, 2007 at 07:04 PM

  • And not to forget. There are many premade vmware images here: http://www.vmware.com/vmtn/appliances/directory/ and more on the other sites or search for torrent files. You can play these images with vmware player. it is a free software.

    Posted by: ilvisne on April 22, 2007 at 11:20 PM

  • You don't need to spend money to use Ubuntu in VMWare: test-drive here ;)

    Posted by: felipegaucho on April 22, 2007 at 11:27 PM

  • When Vista first came out on MSDN it took us 3 attempts at burning it (with a slower burn speed each time) before we could get an image good enough to install from, so this isn't really just an Ubuntu problem.


    I also switched to a dual boot (Kununtu 6.10) but I practiced the install first in Virtual PC (version 7.0 is now a free download at Microsoft). You could also give Virtual Box a try.


    However, I do agree with your general (unstated I think) conclusion that Linux really isn't ready for the average user on the desktop. I have had a lot of problems with my install at home (randomly freezing X manager) that could only be solved by installing the NVidia graphics drivers - the process for doing this was scary enough for me, I can't imagine an average user being able to do this.


    This isn't a dig at desktop Linux, now that I have my install working correctly it is very nice, but until hardware manufacturers start selling systems with pre-configured Linux installs I still see it as an enthusiasts OS.

    Rob

    Posted by: rasto1968 on April 22, 2007 at 11:32 PM

  • It looks like Kirill, Felipe and I have very different preferences on the favourite o.s... we should arrange a talk together sooner or later, it could be amusing ;-)

    Seriously, the issue with burning the CD/DVD is real - I didn't have problems with Ubuntu recently (but with some older Linux release) and I do have with Solaris - the DVD installation fails with a reading error in spite of the fact that the iso image is checksummed ok. Intuitively I'd blame the burner too, but a) I never had problems with burning CD/DVDs but with Linux or Solaris images, and b) I tried with three different burners (hw & sw) and got the same error. Weird indeed.

    For the rest, I can't comment yet. I'm still stuck with upgrading from Edgy to Feisty, as the installer freezes for a while and ends with "Cannot download release notes". It could be a problem of mine, of course, but I must say that upgrading Mac OS X has been always been a smooth experience (and I can't be counted as an Apple fanatic since I've just recently bashed them for the delays with Leopard and Java 6).

    Given that, I'm pretty excited with this Java-Ubuntu marriage. Great news. Even though there's some glitch, you somewhat expect them the first time.

    Posted by: fabriziogiudici on April 23, 2007 at 02:12 AM

  • Another point of advice: don't just google up random blogs suggesting to delete this or that. Use the Ubuntu forums & IRC channels where people who understand what they are doing can help you.

    Posted by: robilad on April 23, 2007 at 02:36 AM

  • I'd like very much to attend the Ubuntu forums, but I get this when try to register:


    The following errors occurred during your registration:
    Invalid Referrer Specified


    I presume it's Safari-related?

    Posted by: fabriziogiudici on April 23, 2007 at 03:12 AM


  • Here is a good how-to on using Qemu and Vmware Player to make your own Ubuntu virtual machine installation:


    VMware Player with your own Ubuntu installation


    Quite easy, no need to install Vmware Workstation/Server.
    The how-to uses Ubuntu 5.10, just replace the 5.10 with 7.04

    Posted by: janihalinen on April 23, 2007 at 04:00 AM

  • You do not need to manual install Eclipse (although I prefer it). What you need is to tell the system what is your default JVM and tell Eclipse to use it.

    follow this instructions: http://wiki.liferay.com/index.php/Liferay_Development_Environment:_Ubuntu_Linux#Eclipse_IDE

    Learning how to use update-alternatives is also very useful during development.

    Posted by: ildella on April 24, 2007 at 05:40 AM

  • I guess it all depends on what you are used to. I just got a new laptop and had Ubuntu running on it in new time. My problem was that I had to keep the Windows partition for one project. I am a bit rusty with Windows, and it was the first time for me to use Vista. It took me many, many hours of futzing to deactivate unneeded services and the preinstalled crapware so that it works at an acceptable speed.
    How do ordinary consumers deal with this? Wait, I think I know the answer--they don't. That would explain why most of my students' machines, even the shiny new ones, crawl like slugs.

    I am a happy Linux user and have learned how to deal with its foibles. I imagine that happy Windows users know how to tune and maintain their machine. But if you just want a good out-of-box experience, I can't recommend either. The Mac is much better at that (but of course, it has Java issues...you can't have everything).

    Posted by: cayhorstmann on April 25, 2007 at 11:54 AM

  • I found that Eclipse depends on the GCJ java, and GCJ cannot be uninstalled without uninstalling Eclipse. Here's how I got Eclipse to work:

    Install Sun java 6 via Synaptic
    add the folloing to /etc/environment:
    JAVA_HOME="/usr/lib/jvm/java-6-sun"
    logout/login

    Ryan Courtnage

    Posted by: rcourtna on April 30, 2007 at 08:24 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds