Pulled into the local YMCA tonight for my Shotokan class and my son (we do this crazy stuff together) said “hey Dad there’s another one of your cars!” Now its late dusk…we’re moving past cars in the parking lot quickly…and my 8 year old can correctly identify a Turbo-X! A budding Saab-o-phile. :-)

Sure enough he was right…that’s the first X I’ve seen on the road with me. Excellent!

J2ME development is fun stuff I think. For some reason it is cool to deploy your own apps to a cellphone or a smartphone. Add in a thrill factor based on the real potential of trashing your link to the world and once you get started you won’t want to stop. I recently wiped my laptop’s hard drive and am back to a clean OS. What better time could there be to look at NetBeans and Eclipse as J2ME platforms and figure out which way to go.

Disclaimer: So if you read my blog regularly you will know I’m an Eclipse guy. So can I be fair? Probably not, but I will try to be.

The Challenge: I’m running on win XP Pro on a T61p Lenovo laptop. I have some existing NetBeans apps and I have some J2ME based apps that are targeted at Nokia and RIM phones. I’ll compare easy of installation, configuration, project importing, project creation and the build/deploy process.

NetBeans 6.7 M2

NetBeans has been around for a while as one of the main competitors to Eclipse in the Java development world – IDEA’s IntelliJ being the other one (my personal favorite as well). Getting started with NetBeans is pretty easy. I’ve started myself off with a clean install of a few tools before attempting to install the product.

First off for any J2ME work it is a good idea to get your own JDK. I grabbed JDK 1.6.0 U12 from Sun’s site and installed that to c:\. I also grabbed JDK 1.5.0 U17 because many cellphone SDKs still use this one.  I also installed that to the C drive root. I do a lot of bluetooth work so having an install of the Java Wireless Toolkit is a must. Get it here and install it to your hard drive.  Bluetooth is fun stuff, although it can be a bit frustrating…check these two articles if you are interested in learning:

  • http://developers.sun.com/mobility/midp/articles/bluetooth1/
  • http://developers.sun.com/mobility/midp/articles/bluetooth2/

Great stuff…but I’m off on a tangent – back to NetBeans.

Grab the installer  – I grabbed the version wit J2ME integrated, although it is annoying that you also ahve to download all the glassfish crap. Why would I want that if I’m doing mobile development? Ah well – when the installer starts up you can unselect that crap by clicking the customize button and j2me-2unchecking what you do not want. That’s pretty good. An alternative method is to get a bare-bones installer and as with Eclipse you can add the correct plugins – I tried that but could not come up with the magic combination of plugins so I fell back to this method.

Once the install is complete I found it a bit difficult to get a project created. For some reason things did not seem to be installed. On the welcome screen there were some links to example projects. I picked one of those off and sure it enough I got a pop-up about “activating features”. My sample got loaded up properly and then everything seemed to be working.I would suggest that you do the same thing.

After that you will need to (or want to) get the SDKs installed and registered with NetBeans. This is pretty simple. I’m going to be working with Nokia Series 40 phones. I grabbed the SDK from their site and installed it. To add the SDK into NetBeans click on Tools and then Java Platforms. Click the Add Platform button. Then select Java ME MIDP Platform Emulator and hit the next button. NetBeans will scan around for SDKs. When I originally tried NetBeans I was using version 6.5, however when I j2me-3was trying this, hitting next did nothing. No clue why. I tried this whole routine on my main workstation and no problems, but no dice on my laptop. Version 6.7 M2 does work so on I go. Anyway pickoff the platforms that you want, you should see the wireless toolkit and any other SDKs that you have – in my case the Series 40 Nokia.

When you are done you should be dumped back out at the original platform screen , but now you will have some J2ME platforms listed. At this point you are ready to build or import projects.

The NetBeans interface is a decent one – although I don’t like the icons and how they are laid out in various little toolbars all over the place. Many of the icons just seem silly too – like the icon for shifting a line…isn’t that a “tab”? Do I really need an icon? I’d rather have an extra line of code on the j2me-6screen. Anyway – that’s probably my preference…the interface is snappy. Screen refreshes are fast and menus popup right away.

The project structure is obvious and the Navigator is also handy. The output window for builds is odd with many messages that seem strange to me with lots of pre-init, csc-init, etc. messages that I have no clue what they mean. I have not figured out how to get rid of these so that I can just focus on coding messages.

When you build cell phone apps managing configurations is really important. You need to manage different graphics, forms, widgets, etc. so that your UI and perhaps even your functionality is tuned to the capabilities of the phone. NetBeans supports this with Build Configurations . Its pretty simple to add configurations and they work well. You add a configuration and then you can pick off which one is the current active one for builds. Great stuff…but how do you edit them or create your own?

Hmm…well for that matter how do you build a platform? Hmm…this exposes a major issue with NetBeans; Where’s the documentation? There really isn’t any. There’s some tutorials and things on the NetBeans site and the internet, but formal docs are almost non-existent. To make things worse the size of the user base is an issue with getting help in on-line forums and community stuff.

Eclipse 3.4 and Mobile Tools for Java

Mobile development with Eclipse will be fairly straight forward if you are already familiar with using other development perspectives in Eclipse.  In fact this is really the main benefit of Eclipse. To start off you need to add the Eclipse ME update site to your config and install the plugin.

I like to keep my mobile projects separate from non-mobile projects. You can do this in two ways – I’m still on the fence about which is better:

  1. Create a new workspace specifically for mobile apps
  2. Create a new eclipse installation and use that for your mobile projects.

This time around I’m using the first approach. Once you have the base tools installed you’ll see new options for creating midlet projects and cldc projects, but really the next step is to get SDK from some phone vendors. As with NetBeans I grabbed a Nokia kit for series 60 phones and I’ve also grabbed the RIM eclipse plugin from http://www.blackberry.com/developer – my personal favorite phone development platform.

Once you get things installed you can create projects easily. First switch to the JavaME perspective or the perspective for your SDK. Once that is done you can eclipse_mtj2then do the regular “eclipse” thing with the “File->New->Project wizard. You’ll see the options for  MIDLet projects.

You’ll notice also here is where I can pick off a specific phones configuration or SDK for my project. Once a project is created there are differences in how you move forward. With Nokia SDKs you can add one of more midlets to the project and work with the project overview screen for how to package and deploy the applications to either an emulator or to an actual phone.

The RIM SDK is fairly similar to Nokia – just different enough to be annoying. For example each Nokia project has a nice overview screen that shows all the current properties, but rim uses the eclipse standard properties dialog available by right clikcing on the project in the Package Explorer.

In general tho it is a simple matter of reading the docs for the SDKs and you can quickly make headway. The same goes for general documentation on the MTJ tools themselves. For getting started this is a huge difference over NetBeans. The docs are good from both the MTJ project and all the documentation from the phone manufacturers themselves. Perhaps this is ananomaly with RIM and Nokia that they have great docs and other brands do not, but for me this is a big difference over NetBeans.

Once your projects are started you can get all the regular Eclipse style editors, configurators, and run/debug dialogs. Here’s a screen shot from a RIM project and you’ll see that things look pretty familiar. Launching an emulator to run your eclipse_mtj3project is fairly simple. With the Nokia SDK simply add one or more midlet’s and select the one you want to launch from the project’s Overview page. With the RIM SDK you need to activate the project by right clicking on it and then with teh same menu you can select “run as” and the emulator you want. You can get many different emulators from the RIM site.

Conclusion

So which to use? For me the ultimate decider might be to first look at what phones you want to use and see what the brand provides. If you’ve got a choice and are new to mobile development I think Eclipse Mobile Tools for Java is a better choice. More brands are focused on it, the documentation is dramatically better, the community is larger, and most Java developers will be familiar with the IDE straight off.  Pick a pun: “NetBeans is being eclipsed by MTJ” or “the Sun is setting on NetBeans”…ha ha…but I think its probably true.

Recently I got a fresh drive from my IT guys…and well of course its lots of fun to chcuk mud at them, but what’s the point? I asked for a bigger drive because I do a lot of stuff and they said of course. However when they installed my new OS image, I’m sure they used the standard image and guess what…well that created a puny 60GB partition. I never looked in My Computer – I just checked the drive and saw 160GB…drooled a bit…and shoved it into the machine. Needless to say today I got the dreaded “Hey your C drive is full” message from Windoze. Oops – crap. Read the rest of this entry »

CMS platforms seem to be a dime a dozen these days. Plone, Drupal, Joomla, SharePoint…the list goes on and on. I’ve used many of these tools over the past  four or five years. I’ve always though Plone was the best tool (except for that wacky database), but Drupal is also a favorite of mine and the one I use the most these days. However there is one area these tools typically fall short on: document versioning, rendering, and workflow control. This is the bread and butter of collaboration in most company settings. Despite all the hoopla around wikis and blogs, if the system is not adept at the aforementioned tasks then it simply will not be accepted by most corporate users. Read the rest of this entry »

Normally I keep my blog fairly targeted at technology or beer, but I’ve also posted on my love of SAAB cars and my Turbo-X. Obviously all the news about the demise of GM and the abandonment of their foreign brands (SAAB being just one) generates lots of funny comments from friends, questions from other SAAB fans I know, etc.

So what do I think? First of all – don’t listen to me – go to the best spot on the ‘net for all things SAAB. It is also a great example of what you can do with Movable Type’s latest blogging platform..see I did squeak in a tech plug! Mr. Wade really has a nice blog over there at SaabsUnited.

So I have no clue if SAAB will make it, but I hope they do. I can only say my car is a fantastic ride and has proven over 16K miles to be very reliable and really an absolute dream to drive back and forth to work. I also think SAAB is pushing the envelope in things like biofuels, fuel economy, and safety in ways other car companies do not – even BMW, Mercedes, and the Japanese brands.

What does cause me some embarrassment is GM’s behavior. As an American I expect more from an American company. Our companies should treat their employees and customers better than this. The only thing that really is clear about the entire situation is that GM has been almost negligent in how badly they have managed their brands. Its kind of shameful to chuck aside so many lives and careers – you don’t see other brands doing this to the same degree. Why GM? Its not just SAAB in this situation it is Opel, Holden, Saturn, and Hummer too.

I think GM owes something to these companies – how much I’m not sure. They should get some funding so that if they want to try and make it that they are on good footing to do so. This is what a parent should do.  This is what a company should do for its employees and its customers.

SAAB plans to attempt to resurrect itself (or Swedish terms “reorganize”) – I hope they make it. The new cars they have ready to build look very nice – the new 9-3X would make a nice replacement for my wife’s Acura MDX.

We all know this happens. No matter how hard we try at some point we have to work with a product that we don’t really like, but a customer or employer does.  Usually it is not worth quitting over (unless it is a Microsoft product of course – lol). You bite the bullet and keep telling yourself that learning something new is always a good thing, right?

In this case I’ve been playing around with Oracle 11g RDBMS. Oracle has always been a bit of a PITA type product.  It is the industry “gold standard”, but it can also be  “developer hell” because it can be a bit quirky, eats resources on a development box compared to other solutions, and tends to have loads of odd “features”. It is also a pig on a Win32 machine and the developer tools are $$$ and they tend to demand serious resources too. Well here I am once again having to deal with it – really it is fun…really :-) . I’ve not used 11g but I found 10g to be a pretty boring upgrade from 9i. Will 11g be better? Here’s some tips and things I’ve learned from using 11g for a couple of weeks. Read the rest of this entry »

I do most of my development work on Windows XP, but now that I have a decent laptop running Fedora 10 I thought I would see how it is doing something useful with the machine. I recently setup a complete JBoss stack for doing Seam and portal development with JBoss portal. There are a number of obvious differences when it comes to getting the complete set of tools installed on Fedora. In this post I’ll run through all the steps required to get a fully working development environment setup. Read the rest of this entry »

Hey thanks for reading my posts. It’s fun writing things – it helps me learn things faster and if I can help get the word out about something new and innovative then that’s good too. Here’s a list of the top 10 most read posts for 2008:

Images & Galleries in Drupal 6 6,436
Drupal 6 Theme Positioning 4,635
Using Views in Drupal 6 3,036
Driving the Saab Turbo-X 1,957
Liferay…I need a Life Jacket; Giving J 1,244
Working with Drupal Themes Pt. 1 1,118
Taking a Break with Ubuntu 8.1 1,045
Drupal 6 – Bringing CMS to the Masses 1,040
Building Modules with Drupal 6 978
Toad for MySQL – A True No Brainer Decis 950

In 2009 I’ll be continuing to post about technology, software/programming, Saab, and things that drive me nuts (and I don’t mean cashews).

Best wishes for a happy, safe, and relaxing holiday season.

Beren Erchamion.

After several weeks of trying I finally had to give in to my sweaty and now pruney hands. I could not get the heat out of my Ubuntu install on my T60p laptop. I tried everything…CPU monitors, tuning down the speed, blowing out the vents, BIOS changes, and all that. Last night I grabbed the Fedora 10 installer, burned an ISO and re-booted. I completed my install this morning and although these two distros have a lot in common, they also have some definite differences in how they work.

Installing Fedora was quite easy. I simply went to their website and downloaded the ISO for their bootable OS. It is 638MB so it takes a while get grab. After a couple of beers (a DAB lager and a Flying Fish HopFish IPA) I was ready to burn a DVD, reboot and up came a complete Fedora distro running on my laptop. After a quick check to make sure I could get a WiFI connection, that my graphics card was working, and that my CD/DVD burner was working, I clicked on the desktop icon to initiate a full install. Read the rest of this entry »

I recently got a chance to spend an entire working day with Ubuntu at my employer. This is sad, but I grabbed the wrong laptop on the way into work and when I emerged from standby lo and behold I saw my Ubuntu desktop and not my XP machine. Oops! Well – my commute is too long to go back so here’s how my day unfolded.

Once I got over the initial shock of “oh geeez I’m an idiot” I realized – hey my Ubuntu machine recognized my docking station correctly and mounted all my USB peripherals correctly! I’ve got a mouse, a USB drive, an external monitor, and a hard line ethernet cable. Wow – that’s cool! I was up and running. Next up I took a look at email and calendar…well we use Exchange and we do not use OWA so email and calendar was going to be a problem. That’s ok – I got a b-berry. I quickly configured Pigdin for my gtalk list – that’s the most impt. communication tool for me.

I had a bunch of meetings today – about 6 – so I had to go to standby and come back out a bunch of times going from the dock and to full mobile in several cases. Ubutnu handled this with no issues. I tried to use a projector with the laptop and that was an issue. I could see the image, but it was obvious that something was not quite right. In the mode where the laptop shows nothing and the project shows something the screen was scrambled. In dual mode the screen showed up, but I couldn’t use the mouse or scroll bars and stuff like that. I was using a cheaper Epson projector and my linux laptop was running at its highest resolution so my guess is a synch problem between the two. Dropping into a lower res would probably fix the problem.

I had to edit a bunch of documents (MS Word), checking them in and out of our Alfresco system. No problems with Open Office 2.4. No problems with hard-wire network connections. I didn’t try WiFI since we have a protected VPN installation and I didn’t have access to a linux client on such short notice.

Power management was decent during the day with several meetings over an hour on battery not being a problem.

My only complaint about Ubuntu is the whole heat thing. What is up with the heat and fans? Fedora does not do this and certainly XP does not either. My hands were hot and sweaty all day. Ick.

Other than that a good day with Ubutnu – but I’m still on the edge of blowing away my machine and going for a shot with CentOS.