must override a superclass method

I just did an update from Mercurial, and I found one of the class having compilation error on one of the method.

XXXXX must override a superclass method

I do notice that method has an annotation called "@Override". A quick search, I found that's because my Eclipse's compilation level is set as 1.5.

Preferences->Java->Compiler
Make sure Compiler compliance level set as 1.6

DropBox + Mercurial: A perfect solution for code development

Ever had the problem copying codes over from one machine to another, most likely, home vs work? DropBox solved the problem syncing the codes between different machines, while Mercurial (without Push) provides version control abilities.

Changes between different Java JDK

Last week, one of my colleague told me that there is some compilation error in his project, while I checked mine, I have no problem, then quickly I found the problem: I am using JDK 1.6, while he is using 1.5. The culprit is a method from String class isEmpty(), which is a total new method at JDK 1.6, this incident prompts me to think if there is way to quickly find out the changes between different JDK.

I found this link , which shows differences between between 5.0 fcs and 6 Beta.

1.6
1.7

DBVisualizer

I just found something that I didn't know about DBVisualizer

 1. For selected table, we could sort the order of columns by clicking "Grid Column Chooser", and we could also customized which columns to be visible or not. And the customized columns will be kept until we close DBVisualizer, it would be really nice if the customized columns could be saved even if we close the application.

2. DBVisualizer also provides type as search function in many aspects.

3. We could also filter on table name in DBVisualizer, but it would be really nice if this is could be done by type as search.

Get current user name in Flex

package
{
    import flash.filesystem.File;

    public class UserUtil
    {
        public static function get currentOSUser():String
        {
            var userDir:String = File.userDirectory.nativePath;
            var userName:String = userDir.substr(userDir.lastIndexOf(File.separator) + 1);
            return userName;
        }
    }
}

Get current user name and machine name in Java

    System.out.println(System.getProperty("user.name"));
    java.net.InetAddress localMachine = java.net.InetAddress.getLocalHost();
    System.out.println(localMachine.getHostName());

Cannot load 64-bit SWT libraries on 32-bit JVM in Eclipse

Let's end this once for all.

You got this problem is because you are using 64bits Eclipse, but your ant target is using 32bit JDK.

It's OK to use 32bit JDK in Eclipse, but you'll have problem when your ant need some GUI prompt, at this point, it will call Eclipse to generate this GUI prompt which is 64 bits, and now we'll have problem.

Solutions:
1. Use 32bit Eclipse
2. For those ant targets which require GUI prompt, change JRE to 64bits JDK.