Wednesday, January 24, 2007

J2ME Applications to run on Sony's PSP




People at java4psp are porting J2ME Virtual Machine to the PSP which means we will see J2ME apps (and games) running on the PSP soon! The project's name is BLUEKVM. This also enable we programmers to program the PSP in Java language (which is easier to code/debug than those alien C/C++).

Welcome to PSP Java Development!

This is an experimental project on the Java technology for the PSP platform.

Current Subprojects
1. BLUEKVM - A port of the J2ME technology's Kilobyte Virtual Machine (KVM). The KVM core libraries, virtual machine

features, security, input/output, and networking is defined by the Connected Limited Device Configuration,

version 1.1.

Please visit http://java.sun.com/javame/index.jsp for more details of the J2ME technology.

Download the BLUEKVM demo version (bluekvm-psp-demo-version.zip)
to see a sample Java code running on your PSP!

2. PlayStation Device Profile (under research)


QPOINT Software Group
PHYSIKA, THe U.P. Applied Physics Society

Thursday, January 18, 2007

UTF-8 in Netbeans 5.5

I have Netbeans 5.5 with JDK 6.0 running on my Windows Vista RC1 for a month now. Problem arises when I need to use Thai language in my Java Applet project.


From the figure in the left, I try to draw a string, "สวัสดีครับ", but it was displayed as "??????????". By the way, If you enter your Thai texts via Netbeans' properties editor they will be displayed properly like the caption of JButton in my applet. (If you examined the designer generated sources, you would see escaped string instead of pure Thai text)

To fix the problem, right click on your java source file, click on properties, change the encoding to "utf-8".


After changed the file encoding, you have to close your file and reopen it. You can now edit your file and it will be saved as UTF-8.



But if you compile your file at this point, you will get something like "unmappable character for encoding XXX" error. There is one more little thing to change, Go to project properties window by right click on the project name in the project navigator and click on properties, Go to build->compile and add "-encoding utf-8" at the Additional Compiler Options.


This is my result,


This solution may apply to other foreign languages too.

Sunday, January 14, 2007

Just rescued my write-protected USB flash drive


I bought my Apacer Handy Steno HT202 256MB around 2 years ago. But in the last 2-3 days, I cannot make any modification to the file on it. Windows XP keeps telling me the same message about write-protected things. I am pretty sure that there is no thing such as write-protected switch or hold switch on my model.

After a long research over the internet, I found that many people experienced this same problem too. Some of them resurrect their devices by reformatting it in Linux. Some of them do a low-level format using a program named OnBelay. But neither of above methods work for me. Linux told me the same message as in Windows XP (the drive is write-protected blah blah). And OnBelay told me that my model does not support low-level formatting.

So I decided to go out and buy a new one. I bought Apacer Handy Steno HA202 1GB (Apacer again?). I just like its "never losing the cap" design :) USB flash drives are incredibly cheap these days.

When I arrived home, I decided to write to Apacer's tech support about my issue. Not really hope that they could fix my problem because I heard from many places before that tech supports in big companies are useless.

It takes not so long for them to answer my email (less than 10 hours). I am really impressed! And the support give me a link to download a program which can do a low-level format on my HT202. I hurriedly download and try it. My HT202's light flashes for a few minutes. All my data is erased. I try copying a file on to it and it works !!!!

Hope this can help people who is experiencing the same problem :)
Big thanks to Apacer's tech support team!!!

ps I am not sure if I can redistribute the low-level format program here so you, who have the same problem, should write to tech support team yourself. Apacer's web site address is http://www.apacer.com

Related Pages: