Archive for May, 2009

Solution for J2ME Sony Ericsson Emulator “Couldn’t load zayitlib.dll library” problem

I’m initiating in J2ME world, specifically games developing for mobile phones, using Eclipse with EclipseME plug-in. In my first application was presented with “Couldn’t load zayitlib.dll library” error message when tried to start J2ME Sony Ericsson W200 Emulator.

The solution founded to solve this problem was:

In the Programs Files\VoiceAge folder you’il see many files, between them, four specifics dlls called SPOTCorePlayer_51.dll, SPOTxdePlayerDLL.dll, VaAce.dll and VaMp_50.dll.

Copy this files to SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\bin folder.

Try to start the emulator again.


Collections, what to use?

Collection interface has many implementations, like ArrayList, LinkedList, TreeSet and others. With so many variations, some times you don’t known what to use, this depends of your objective. Now I’ll try to explain some differences in ArrayList, LinkedList and TreeSet.

ArrayList
The ArrayList Collection allow to store objects and null values, but your access is unordered, the first object inserted, can be a last to retrieve.

LinkedList
This implementation of Collection is like ArrayList, but the difference is in access to objects stored, where each object is returned in your inserted order.

TreeSet
If you want retrieve the objects of your Collection in specified order, this Collection can do the work! Insert values in TreeSet is equal previously classes, but your return depends of Comparable implemented in values. It sort your object values using result of compareTo method, inherited of Comparable Interface.

For more information, visits Collection Javadoc.


Disabling “Sleep” key in Windows Vista

You, accidentally, has pressed the “sleep” key in your multimedia keyboard instead another key? I wanna known how designed this “happy” key to express my total insatisfaction with this.

sleep key

Now I’ll show how to disable this key in Windows Vista.

Go to Control Panel, double click in Power Options:

11

Then click in “Choose what the power buttons do”:

Control Painel

Next and last step, in “When I press the sleep button” choose “Do nothing”, save and apply!

Power Suply

After this tutorial you can press this key in any time. :)


Learn JavaFX in 15 minutes

This video show some commands for JavaFX, from a simple “Hello World” to functions and access modifiers.

Thanks for Roberto Furutani!

Enjoy!


Retrieving hard drives or removable devices

You’ve tried retrieve the hard drives or removable devices using java.io.File and passed “/” like parameter in class constructor? The result is the root of classpath, isn’t?

To obtain the hard drives or removable devices, use File.listRoots(). This code return a File array, where each index of array is a removable device or hard disk unit.

Follow this sample:

File[] units = File.listRoots();

for(File unit : units){
    System.out.println(unit.getAbsolutePath());
}

  • AdSense

  • Copyright © 1996-2010 André L. S.. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress