Java (RSS)

Topics on Java

Blog moved to WordPress and new domain...

I've moved my blog to my own domain and onto a WordPress engine, CS + SPAM was driving me nuts!

Catchup posts: Oh yes, I've been in Japan for a couple of months, first 2 weeks of photos are uploaded on Flickr, I still havent had a chance to upload the thousands after.

Whats more, I've actually written some information about me so you can finally find out my sad sad way of life. See About Thushan Fernando.

Using PIPE mirrors for Ubuntu Repositories == Free Traffic == Goodness!

A quick tip if your ISP is in the PIPE Network (check on page!) if you want to save up your bandwidth (or if your like me, have none left half way into the month and still need to get updates) try adding the PIPE mirrors from iiNet to your sources list:

First edit your sources.list file:
sudo gedit /etc/apt/sources.list
(use gedit, nano, vim or whatever editor you like!) and then insert these:
deb http://ftp.iinet.net.au/pub/ubuntu feisty-backports main restricted universe multiverse
deb http://ftp.iinet.net.au/pub/ubuntu feisty-proposed main restricted universe multiverse
deb http://ftp.iinet.net.au/pub/ubuntu feisty-security main restricted universe multiverse
deb http://ftp.iinet.net.au/pub/ubuntu feisty-updates main restricted universe multiverse
Thats for Feisty, others are available too (see list here) just replace 'fesity' above with whichever distribution you have installed.

Java 6 released

Well Sun have finally released Sun Java 6 (1.6).

See what you think of it, i havent been keeping tabs *that* much on Java but I guess this weekend I'll be digging in:-)

Oh thats the other thing, no parents for a week (they're off to Malaysia en route to Sri Lanka) so a week after they leave and a week before they come back I've got the house to myself... too bad i'm working though:(

Netbeans 5.5 Released!

My favourite Java IDE (ok so Eclipse is great but I prefer Netbeans for quick and dirty stuff - like assignments!) Netbeans 5.5 just got released with a brand spanking site new design which is alot better IMHO.

Only a few days ago I downloaded RC2 - and had to register at Sun to download it but now there's no such deal. Checkout some of the cool new Plugins available too!

LINUX: Switched to Ubuntu, well not completely...

Yes thats right, I've finally took the plunge and gone hardcore with Linux! My first encounter was with Red Hat 6 in 2000 (I got free install CDs from somewhere) while I thought the installer was good i didnt like RH itself or what Linux was back then. But 6 years later taking a fresh-no-preconcieved-thoughts-look at Ubuntu (and Fedora Core) I feel the difference.

So much so that my now-ancient Inspiron 8600 I bought back around this time in 2004 is now running Ubuntu 6.06 which was previously booting Windows 2003 (for work purposes). Another workhorse (Inspiron 6400) is still running Windows Server 2003. I'm finding more and more that I tend not to use the Windows dual-boot on the 8600 (unless its at uni - Wireless/VPN etc) and instead happy enough with Ubuntu + WINE if i really need to run anything. Main desktops are still happy chugging along to Windows XP Pro and probably wont change.

So time to start blogging about Ubuntu and my adventures...

First of all why Ubuntu? Why not Fedora or another distro like - ewww - Lindows?

I've found the neat packaging system useful and the fact that its based off Debian (which i've used for a while as a "toybox" in the past) I'm used to the feel. Ubuntu's like the "hot new distro" (not new!) this year (like Gentoo was a year or so ago). Currently i'm using GNOME (didnt like KDE) and just got XGL running natively on a desktop box yesterday (not that hard at all following this guide!)

First things first, after the lovely installer handles all the hard work partitioning, installing and maybe fixing GRUB to dual boot the first thing you should do is to go ahead and have a good look through the Ubuntu Guide for Dapper. Heres a rough outline of what I did (dont forget I'm still a Linux-n00b) with my 8 or so installs (keep in mind that all the machines/notebook are powered by ATI cards) so far:
  • UPDATE UPDATE UPDATE!
    Greatest thing I enjoy about Ubuntu (and debian) is the updating, its so seamless! Goto System > Administration > Update Manager and download all the updates you need for your box!
  • Get Easy Ubuntu
    Previously I went through and manually installed most of the apps that this beauty will automate for you. Installs (taken from Ubuntu Forms post):
    • Add extra repositories for installing a lot of additional software.
    • Install multimedia codecs for reading all videos, musics and DVDs.
    • Activate the "audio preview" feature in Nautilus.
    • Install the most needed Firefox plugins: Flash, Java, Real, videos. Adds Microsoft fonts, GNOME's Firefox buttons, officials Firefox icons.
    • Install archiving support for RAR and ACE.
    • Install the most used peer-to-peer softwares: aMule (a clone of eMule) and Azureus (for Bittorent).
    • Install the Skype voice-over-IP software.
    • MSN: Install AMSN cvs with webcam support.
    • Num lock: Active the num lock at system startup.
    • Replace the GNOME foot logo with Ubuntu's logo.
    • Install the NVIDIA or ATI driver for 3D support.
    This alone will get you the basic necessities you'll need.

    I cant recall if hte ATI driver installed is the Messa one or the ATI one, but make sure if your running an ATI card you use the latest ATI release (v8.27.10 as of writing) by running 'fglrxinfo' at terminal:
    thushan@NOTEBOOK04:~$ fglrxinfo
    display: :0.0  screen: 0
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: MOBILITY RADEON 9600 Generic
    OpenGL version string: 2.0.5946 (8.27.10)
    thushan@NOTEBOOK04:~$
    
    Check its using the accelerated version of the driver by running:
    thushan@NOTEBOOK04:~$ glxinfo | grep -i direct
    direct rendering: Yes
    
  • Make sure your using DMA where possible!
    Edit hdparam.conf:
    # sudo gedit /etc/hdparm.conf
    
    Make sure you enable DMA, this is whats in mine:
    /dev/hda {
            io32_support = 1
            dma = on
    }
    /dev/hdc {
            io32_support = 1
            dma = on
    }
    
  • Get a copy of SwiftFox
    Dapper comes with Firefox by default (and its the default browser installed) but you'd want to try SwiftFox, an optimised (and always recent) builds of Firefox for Linux (much like Moox was for Windows - no longer maintained!) aimed for several CPUss, theres also a neat Installer script to set it up for you! I always add these extensions
  • Get Build-Essentials and manuals
    sudo apt-get install build-essential manpages-dev
  • Get WINE
    WINE has matured so much since I last touched it.
    sudo apt-get install wine msttcorefonts
    
  • Get Skype
    I'm a VoIP junkie...
    sudo apt-get install skype
  • Install some cool apps from 'Add/Remove'
    There's an abundant amount of apps in the Add/Remove list (tick 'Show unsupported applications' & optionally 'Show Commerical APplications' to see stuff like Adobe Acrobat viewer etc and go nuts! I've got too many apps to list but some small selection of handy tools:
    • AbiWord
      OpenOffice is tweakable (Tools -> Options -> Memory, Steps=40 | Graphics Cache: 128Mb | Memory Per Object: 1Mb) but i prefer AbiWord
    • Acrobat Reader
      Theres lots of alternatives but I went with Adobe's v7.x (I use ePDFViewer too)
    • Alacarte Menu Editor
      Cool tool to add/remove/change stuff in the menus in GNOME
    • Configuration Editor
      Configuration Editor
    • Ethereal
      Best network traffic analysis tool around!
    • GAIM
      Probably like all companies, at vividas we use alot of IM to talk/spam you-tube videos etc..
    • gDesklets
      Applets on your desktop
    • GKreIIM
      Monitors your system
    • Klipper
      Clipboard history tool!
    • PuTTY
      Its small, its fast and its so damm cool!
    • Text Editor
      I seem to like this one
    • VLC Player
      Its either totem or VLC, VLC has more options
    • Wireless Assistant
      No need to say why!
    • XMMS
      A WinAMP for Linux
  • UPDATE UPDATE UPDATE take 2!
    Do another update to make sure you've got everything!
I also added a launcher on my toolbars which by default run nautilus with root privellages (command is 'gksudo nautilus')... i'll post a screenshot of my desk later.

XGL baby yeaH!
If your in for some sweet sweet eye candy try out XGL, its deliciously smooth! Theres a guide on Compiz that worked for me (too many HOW-TOs but most fail!)

Good Resource Sites

Two of the best resources (theres lots if you google but these tend to be where I go) for Ubuntu: Phew, this was a long post... More later...

HotHTML 3 Professional FixPack 5 Released!

Well I decided to take some time off (sleeping) and finalise FixPack 5 for HotHTML 3. The build number is now 3000 (epic milestone!) and mostly caused by alot of rework to make HotHTML 3 load faster, initially I intended to add a new Ftp Editor to make it easier to upload/manage websites, but due to a rewrite of the Ftp core taking longer than expected I decided to postphone it till FixPack 6.

This release is "IE 7 friendly" (atleast Beta 1, Beta 2 and builds inbetween the two) and recognizes all recent releases of Firefox & Opera also:-)

Change Log(View Text)
=========
BUG FIXES
=========
22806. DocumentData > Loading an empty document gives 'No Document Loaded' in 'DocumentData::Core Engine Runtime' which is invalid.
22805. Core > Checkboxes sometimes may raise errors in validation on some dialogs.
22804. Core > **** EXPERIMENTAL **** New fix for the crash when saving documents every now and then (rare to reproduce).
22803. IDE > VS.NET Tabs sometimes doesnt repaint after recieving the focus again.
22802. WebManager Account Manager > Selecting first item causes a save to be placed into the pending queue when it shouldnt.
22801. Tools > SpellCheck raises a fatal runtime error because it cant locate the 'custom.dic' dictionary file.

=========
ADDITIONS
=========
1.DocumentData can now have a padding of '0' (Zero) so it will ignore file-legth checking.

=======
CHANGES
=======
1. Welcome Dialog > When selecting a file from the recent list, if its not found/non-existant it will prompt and leave the dialog open.
Download HotHTML 3 FixPack 5 and have ago, use our servers (Tucows/Download.com havent been updated yet!).

(NOTE: Updates to the website to reflect FixPack 5 will happen in the next couple of days!)

COOL TOOL: uTorrent Best BitTorrent Client bar none!

For ages I've been using BitComet as Java clients tend to eat memory like no tomorrow, however BitComet also tends to consume memory (although not as bad as other java clients), if you dont want to waste memory while you've got a torrent client up take a look at µTorrent, it'll run at an insane <10Mb of memory and has *ALL* the functions of BitComet (minus the browser which is probably the reason it eats up more memory). This thing is ultra compact and ultra lightwieght, HIGHLY RECOMMENDED! (Goes nicely with cFosSpeed!)

All p2p clients should try more to be like µTorrent!

Struts: Cannot find ActionMappings or ActionFormBeans collection (FIX!)

I've had to tackle some of the (many) statistical data thats stored about the clips on our site (dont worry, nothing sensitive!), now to do that I *COULD* have gone with the lovely ASP.NET stuff, but alas I've got requirements to fufil, so it was decided on JSP. I absolutely *HATE* JSP, (but i've taken a liking to Java - after 1.5), its just seems a tad "over the top" for me, but trying hard to forget my political stance i wrote up the front-end in JSP with a lovely framework called Struts(See site for more info, i'm posting this from work).

So after meddling with and learning Struts(not easy at the start!) I finally finished and went to deploy, somewhere around that time I must have done a cleanup and accidentally deleted a few JAR libaries that are required by Struts, so when i went to run the form in the browser I got this in my logs:

SEVERE: ServletException in '/include/tiles/template.jsp': ServletException in '/include/tiles/body/chartViewBody.jsp': Cannot find ActionMappings or ActionFormBeans collection
javax.servlet.ServletException: ServletException in '/include/tiles/body/chartViewBody.jsp': Cannot find ActionMappings or ActionFormBeans collection
        at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
        at org.apache.jsp.include.tiles.template_jsp._jspService(template_jsp.java:185)
	[...]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:595)
OK I thought, Cannot find ActionMappings or ActionFormBeans collection must be something in my web.xml file, so I rolled back from CVS, nope, struts-config.xml? Nahh... So I was stumped for 3 PHAR-King days trying to think wtf was going on (and in the process hacking uneccessary things to try and fix it). TOday I stumbled apon the solution:
Cannot find ActionMappings or ActionFormBeans collection really means You may be missing some jar libraries in the '/WEB-INF/lib' folder. (add any course language as necessary!)
Thanks Struts guys! You guys rock, your messages are *SOoooo* helpful:-)

If you've googled the error and came here, heres what (the minimum) you need to have in order to run STRUTS:

  • commons-beanutils.jar
  • antlr.jar
  • commons-digester.jar
  • commons-fileupload.jar (as the name goes, I think its optional)
  • commons-logging.jar
  • commons-validator.jar
  • jarkarta-oro.jar
  • struts.jar
So make sure all the above (with the exception of fileupload I think) are there and try and run it again, it works!

I've openned up a Struts/JSP/Java area to talk about my findings/messings in this area.