Friday Aug 19, 2005

Black Shark for J2ME

Hero Craft has launched a game for your J2ME phone named Black Shark. The premise of the game is a Russian special forces officer is mining uranium on a remote island to develop weapons of mass destruction. It is your job to steal a KA-50 "Black Shark" helicopter to stop him.

Friday Aug 12, 2005

NetBeans and FIXME's (and other notes to self)

We recently went through the process of scrubbing our code, that is looking for comments in the code which shouldn't be in a released product. The comments generally start off with FIXME, TODO, and XXX, although they can include anything (I usually start mine with my login id. That way I know its my comment). NetBeans has a couple of tools you can use to easily find all of the 'notes to self' in your source code. The first is the 'To Do' window. If you go to the Window menu, you can select the 'To Do' window (Ctrl-6 for you keyboarders). Once selected, you'll see a window display at the bottom of the NetBeans window which takes the entire width of the window. You'll see 'Current File', 'Opened Files', and 'Selected Folder' tabs. If you have any notes in the file which currently has focus, you'll see them listed. You can select the 'Opened Files' tab to see a list of all of the notes in all of the files which you have open. You can also select the 'Selected Folders' tab and specify a folder. Doing so will give you a list of all the files in and beneath that directory which contain notes. Double-clicking on any line will take you to the line in the correct file. BTW, you can also specify custom text as being 'notes'.

Another tool is the Error Stripe. I recently installed this cool tool by updating my NetBeans 4.1 installation. This displays a vertical bar along the right side of the text editor. If all is well with the current file your displaying, you'll see a small green square at the top of the Error Stripe indicating everything is OK. If you see a red square, you have errors in your file . You can hover the mouse over the square and a popup indicating the number of errors is displayed. If you have errors (e.g. cannot find symbol), you'll see red horizontal stripes in the Error Stripe. If you see a blue horizontal stripe, this indicates you have a note to yourself. The Error Stripe displays these dispersed up and down the Error Stripe to give you and indication of how far down the error is. If you move the mouse over a stripe, the cursor will change to a pointer. You can single click on the stripe and NetBeans will take you to the issue. The Error Stripe gives you a good visual indication of issues with your file.

Thursday Aug 11, 2005

Opera Ships Opera Mini J2ME Browser

Opera has done a real good business making money shipping "commodity" browsers. In fact, I recently read an article in Business 2.0 on Opera and how well they're doing selling browsers for small devices. They recently annouced their Opera Mini Browser for J2ME enabled devices. What makes Opera Mini different from the Opera Mobile Browser is that Opera Mini gets its web pages from a remote server, which pre-processes the web page before sending it to the device. This makes your web experience better because you don't spend more money shipping across a lot of information you don't need on a small device and you don't waste your time trying to decipher a web page targetted for a desktop while browsing on a mobile device. Upon looking at the FAQ's, I noticed that they don't list specific devices in their requirements list, only that the device support Java and GPRS Internet connections. This is a real testament to the power of the Java platform's Write Once Run Anywere feature. With all of the various mobile devices out there, Opera only needs to write their browser once in Java. Opera states the browser is free, but you need to access it through your operator...and by the way, it's only available in Norway right now. I hope this provides a better surfing experience then I currently have on my mobile device.

Wednesday Aug 10, 2005

Apache Derby To Full Project Status

Recently, the Apache Derby project (a sub-project of the Apache DB project) went from incubator status to project status. This occured in part because Sun voiced backing for the project and is committing people to work on the project. To be a full project, not an incubator project, a project needs to have backing from more then one vendor. For those of you who don't know, Derby is a database, written entirely in Java, and was submitted to the Apache Software Foundation about a year ago by IBM. Derby came from IBM's Cloudscape acquisition. It looks like Sun will use Derby in various Java technologies. Considering Derby is designed to be an embedded database, and not a "database server" ala Oracle's flagship product, I think it will have some good applications in the J2ME CDC space.

Tuesday Aug 09, 2005

Soccer On Your J2ME Phone

EA Sports is close (October) to releasing FIFA Soccer 2006 on J2ME phones. I read this article which statest the graphics on this game are pretty amazing. You can pick from 32 international teams using full rosters. You can pick your 11 starters and make adjustments during the game. Play mimics the console version fairly closely, but to play you'll need both hands (probably the right thing to do when playing a more involved game). You can "pan the camera" and even save parts of a game for replay. Although I'm not a soccer fan, this game looks pretty good.

Monday Aug 08, 2005

Performing a Find in NetBeans

One of the features I like about Emacs is being able to go to a shell and perform a search. I usually use the find command. This lets me find things using wildcards and to perform a search within the found files. Now that I'm using NetBeans, I needed to learn how to search using NetBeans. The way I do this is to highlight the top level directory in which I want to search. I usually use the Favorites list for this. I then hit 'Ctrl-F' or right click on the mouse and choose 'Find' from the menu if I have the mouse in my hand...which I ususally do since I need to select the correct directory. The Find dialog displays.

To search for data within a file, enter your criteria in the 'Full Text' tab (the first tab in the dialog).

To search for a Java file with a specific name, go to the next tab entitled 'Object Name'. For you keyboarders out there, you can hit 'Ctrl-Page Down'. Enter the name of the file \*without the .java extension\*. NetBeans knows this is a managed object and it knows what type of object is being searched for (we'll get to that next), so it already knows the extension.

Next, go to the 'Type' tab. To select 'Java Source Objects', the selection you want, I usually hit the 'J' key 6 times and it is highlighted. The last thing to do is hit 'Enter' and the search will start. You'll see the 'Search Results' window display and let you know if it found anything. Happy Searching!

Tuesday Aug 02, 2005

Interactive, Multimedia Self-Guided NYC Tours Using Your J2ME Enabled Phone

Racontours Inc. has released an interactive tour of NYC using your J2ME enabled phone. Take a tour of Central Park, Greenwich Village, Lower Manhattan, Soho, South Seaport and Washington Square. With the Voyager software, you can take a self-paced, self-guided tour of these areas. You can see images of how each of these areas looked in years past. One real advantage of this is you won't look like a tourist to the pick-pockets of the area, dealing with a fold-out map of NY. The software automatically adjusts itself to the device upon which it is running.

Central Park

Friday Jul 29, 2005

Roaming Messenger on J2ME

Roaming Messenger recently announced support for J2ME phones. In this article, they state "Now, with the support of J2ME MIDP 2.0 devices, the Company's breakthrough platform can support almost all of the new generation smart phones coming to market.". Roaming Messenger lets you send a roaming message, which can show up on one of your many devices. If you don't respond to the message, it will then go to the next device you have listed in your list until you're found or until another action is taken. J2ME let's Roaming Messenger build this application once and support the many different types of devices you may use: PC, laptop, PDA, cell phone, and others (e.g. police in-vehicle device).

Wednesday Jul 27, 2005

J2ME Version of WeatherBug

WeatherBug has released a Java version of its mobile WeatherBug program named WeatherBug Mobile. With WeatherBug, you can get live streaming local weather data, severe weather alerts, detailed forecasts, local radar, access live weather cameras, post and receive weather photos from other WeatherBug users, and customize your own weather reports...all on your J2ME enabled phone. This is pretty cool. You can pick the camera from which you want to see the image and prepare for your daily outing knowing what the climate will be like at your destination. Here are some sample images from the application.

Live Conditions
Live Cameras
Local Radar

Tuesday Jul 26, 2005

Google Maps Now Works with J2ME Phones

You can now use Google Maps with your J2ME enabled cell phone. The application is a 478KB Java application that can be downloaded via WAP from Mobile GMaps for free. This application is an independently built (not a Google product) application by Chrisitian Streng.

Friday Jul 15, 2005

NetBeans' Navigator Window

One feature of NetBeans I like is the ability to select the Inheritance View of the Navigator Window. This will display the SuperClasses and SuperInterfaces of the class at which you're looking.

Another nice feature of the Navigator Window is the fact that it displays the object type of a variable. I recently started reading new code on a project I'm working on. Having the object type listed in the Navigator Window saved me time by not requiring me to move to the variable declaration in the code to determine a variable type, then moving back to the code I was reading.

Tuesday Jun 21, 2005

Beautifying NetBeans Code

One of the first things I used to do when opening a file for editing is to beautify it. Beautifying (also called auto-indenting) is the process of indenting the lines of code in a file "properly", where properly means "to my liking". I say this because everyone has their own opinion of proper indenting, number of indentation spaces, using tabs or whitespace, putting the curly bracket at the end of a declaration line or at the beginning of the next line, etc. Of course, beautifying ends up causing a bunch of meaningless diffs if you diff the file with a previous "un-beautified" version, but it makes the file much more readable for me (and therefore, I'm more productive).

In Emacs, I use:

Ctrl X, H, Esc, Ctrl \\

'Ctrl X, H' highlights the entire file and 'Ctrl \\' beautifies it.

NetBeans supports the same feature. You don't need to highlight any code if you want to beautify the entire file. To beautify a subset of the file, you can hightlight the text you want using standard keys. To beautify the text hit 'Ctrl Shift F' (you can also hit the right mouse button and choose 'Reformat Code'). This will beautify your code according to your settings in the indentation engine used for the type of file your beautifying.

Friday Jun 10, 2005

Sony Ericsson's Java Platform Strategy

Here is a great article about how Sony Ericsson is embracing the J2ME platform for exactly what it was designed for, to remove the differences in the underlying device and OS. In it, Sony Ericsson states "The Java™ technology enabled handset and mobile games market is booming.", "there will be a total of about 2 billion mobile phone users in the world within the next year or so, of which, according to Ovum, there are today 450 million Java-enabled handsets globally), representing potentially the biggest platform for electronic games in the world". Sony Ericsson has released a couple of papers, including one to port BREW applications to J2ME. Also, there's a list of the Sony Ericsson devices and the Java technologies available on them at the bottom of the article.

If you're writing applications for mobile devices, check out J2ME.

Tuesday Jun 07, 2005

Moving from Emacs to NetBeans 4.1

Now that one of the projects I was working on is complete, I have time to take a better look at using NetBeans as my primary development tool. I have been a long time Emacs user for two main reasons: Speed and flexibility. The text version of Emacs is fast, and you can do just about anything in it (yes, the same can be said for other editors as well, like vi). If there is something you need to do which you currently can't, Emacs can be extended to suit your needs. I also like the ability to do just about anything using the keyboard...I hate reaching for the mouse.

Regarding performance, I still would like to see NetBeans run even faster. I stuck with the text version of Emacs because of the slight performance advantage over XEmacs and because I didn't have to deal with X Windows when editing after telnet'ing into another machine, especially over VPN. I'm happy that NetBeans 4 made a big performance jump over previous versions. Adding more hardware (faster processor, more memory) will help improve NetBeans' performance, but it will never equal Emacs' performance. I think I just have to get used to the tradeoff offered by a slower product which is more productive. There are a lot of things I can do with NetBeans that I couldn't with Emacs.

As I started working with NetBeans, I naturally tried to do a lot of things in NetBeans like I do them in Emacs. I wrote a long list of "like to have"'s for NetBeans that will make it more Emacs-like. But as I worked with NetBeans more, two things happened. 1) I began finding ways of doing what I wanted in NetBeans, which I didn't realize I could do. This will just come with time. 2) I began doing things the NetBeans way. I've just started with this process, so I have a long way to go before I let go of my old Emacs ways, but I'm on my way.

I'm about to embark on another project, and my goal is to use NetBeans for everything I used Emacs for. I'll let you know how I fare.

Wednesday May 11, 2005

CLDC, CDC, and J2SE Embedded

You may have seen the recent addition of J2SE Embedded to the J2SE website and asked yourself "What's the difference between J2ME CLDC, J2ME CDC, and J2SE Embedded? By now you probably know the difference between CLDC and CDC. CLDC is targetted towards small devices with limited resources, like cell phones. These devices have limited processing power, memory (minimum 160-512 KB memory), and limited displays. Many CLDC applications are written to the Mobile Information Device Profile, as MIDlets, which do not follow the "typical" J2SE type of programming model. CDC targets a larger device with more capabilities (2 MB of RAM and 2.5 MB of ROM), like newer smart phones and PDA's. Many CDC applications are written just like J2SE applications but with a subset of the API's available in J2SE. Both CLDC and CDC have optional packages which can be added to add additional capabilities not available in the core product. J2SE Embedded utilizes the full set of J2SE API's and therefore targets a device with more processing and memory (~13 MB) then either CLDC or CDC. Which one you choose depends on your needs and the capabilities of your target device. Whichever one you choose, there's a Java implementation to suit your requirements.


Darryl Mocek


« August 2016