Saturday, January 31, 2009

Hello World BlackBerry Storm Style

As with any new development project, one starts off with a simple 'Hello World' application. And so it is with the BlackBerry and Java code on it. I had a bunch of trouble getting the BlackBerry Eclipse plugin to work properly with Eclipse, but after installing, un-installing and generally cursing the damn thing a few times, I got it to work. I think the big trick was to understand that there are 2 things one needs to install:
  • The BlackBerry JDE plugin for Eclipse and
  • The BlackBerry Component pack (4.5.0, though I was able to build for the 4.7 device...)
A separate post on getting the JDE plugin to work and some questions related to that shortly. For now, here's how I got Hello World to work... I followed the instructions from the Thinking Blackberry blog. Below are the screenshots on the 5930 device running the 4.7 OS. There is also the helpful video put out by the BlackBerry folks themselves that I used as well.

Sunday, January 25, 2009

Mobile Application Development

Anyone ever done application development for the mobile platform? I think I've got something going on for the RIM platform. So far, I've got few details that I am not allowed to share... but I have eclipse setup and started working on getting familiar with the RIM Java development tools. I am excited. I've been down this path before and failed. And it was a rough loss.

We (a few other friends) used to sit and wonder at what all we did wrong. We moved on to do other things. One of us works for a search engine, another does QA for a network device manufacturer, another is a Requirements person (he uses terms like MRD). We've learned a tonne since we tried the last time. I think we've learned a lot about how to make businesses work. I just hope we learn a tonne more soon... and succeed. More details to follow. Wish us luck.

Sunday, August 31, 2008

How does one go about documenting complex tools?

I am now writing Java code (hooray for me) and playing around with Ant as part of my work. It isn't entirely tout le monde type stuff but it isn't anything spectacular. Yet. So, to my (much disappointed) audience, I ask, how does one go about learning about any system that is full of things one has little idea of? I learn by trying things and documenting them... but where do I start? From top down? From bottom up? What if I don't know where the bottom is?

Also what are the rules about changing someone else's work? Do you just go ahead and change things willy-nilly? Is there such a thing as respecting someone else's creations and working around them?

Oh, so many questions!

Sunday, March 30, 2008

I win!

Damn you eclipse, you drove me nuts for a while. DAMN. I spent good chunks of my nights and weekends fighting you. I was about to give up and go back to Windows Vista. Damn. I need to update all my newly found Goran Bregović music anyway. Quite a few people mused about what it could be. They were right, somewhat. So, what was it in the end? Lets see.

I install ubuntu. I have no idea what version... The installer decided to install x86_64. Why? Well, I have a 64-bit compatible chip. Well, when you go to eclipse.org and download eclipse, they figure out somehow that I am running a 64-bit version of the OS and let me download the 64-bit version of eclipse. I didn't notice. I installed eclipse. All is good. Or so I thought. I try and fire it up. Nothing happens except for the error. You would think that something so large would log something somewhere. No such luck. I looked in the obvious place: ~/.eclipse. I ran eclipse -clean. No luck.

I searched google. Ubuntu docs say to use apt-get install eclipse. I tried that. No luck. And it installed all sorts of gcj nonsense that I don't really want. I want Sun JDK. More searching ensued. Hours went by. I watched Borat along the way. Its just as much fun the second time around (I watched it the first time on my second trip to Washington DC). Yet more searching. I checked all sorts of things. I tried to launch it manually. You know with all the 50 arguments it needs to start. Still no luck. And quite frustratingly, no log file that says 'Oh by the way, you need blah' or 'you are missing something X that I need in order to run properly'. Grrrrrr.

I ended up searching for stuff specific to Ubuntu and Eclipse and Linux and somehow I ended up on an eclipse.org page. They mention a log file in there too. I didn't find one anywhere. But it was at that point that I ran a uname -a. I had previously also tried to try and start eclipse using Java 1.5 (release 15) but still no luck. Well, uname -a told me I was running x86_64. I kept going. I downloaded the x64 version of Sun's JDK. Hmmm. I installed it. It wanted to overwrite stuff in the 32-bit JDK folder. I decided to wipe out all the 32-bit JDKs. I installed the 64-bit JDK. I ran ./eclipse once more. Would you believe it, I was asked to pick a workspace!

So much for all that checking. Silly me, I should have checked all that before I went about searching google. One issue I still have though is: if eclipse won't start, how the <deleted expletive> am I supposed to know that it is a 64-bit version of eclipse and requires a 64-bit JVM (or a modified start process with a -d32 flag or something)?

Oh well, so much for all that. I have eclipse running. Let that be a lesson to all of you. 64-bit computing is a pain in the ass.

Thursday, March 27, 2008

Getting Eclipse to work in Linux

Getting Eclipse to start in Linux is a nighmare. You can't just double click on stuff like in Windows. Right now, the error I get when I try and start eclipse, I get the error:


JVM terminated. Exit code=13
/usr/local/jdk1.6.0_05/bin/java
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-jar /usr/local/eclipse/plugins/org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /usr/local/eclipse/eclipse
-name Eclipse
--launcher.library /usr/local/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.3.R33x_v20080118/eclipse_1023.so
-startup /usr/local/eclipse/plugins/org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
-exitdata aa8030
-vm /usr/local/jdk1.6.0_05/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-jar /usr/local/eclipse/plugins/org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
I launched the thing using
/usr/local/eclipse/eclipse -vm /usr/local/jdk1.6.0_05/bin/

Lets see how it goes... I am not giving up yet.

Monday, March 24, 2008

Sorry, I promise to do better

To my dear mentor and to my team mate... I do apologise for my lack of working. Its past 1am and I am up. But I assure you I have an ace up my sleeve now, I promise. What is it? Ubuntu 8. Installed via Wubi.

All I need to do now is apt-get install eclipse... okay, well maybe that was a dumb thing to say. I'll do in manually of course. But I assure you, now that I have a happy development environment without any crazy ass security (aside from selinux, but that's another story). I will be back soon, I promise. In the meantime, join the revolution, join Mao and step on the Tibetans... Not.

Nemo me impune lacessit as the good lads from the Black Watch would say. BTW, little known trivia fact; I do indeed own an 18 oz Black Watch kilt with highland hose and flashes... no sporran though. Yet.

Sunday, March 9, 2008

Your next assignment is...

I have a mentor type character who gives me projects to do on a regular basis... and then messages me asking for it. My next assignment then was to do setup Hibernate and be able to do CRUD on an object.

I had a couple of problems getting going related to my box itself. For whatever reason, it takes ages to unzip files. I needed Ant, HSQL DB and the hibernate jar files... and it took painfully long.

I've been working for a while on a simple example based on the Hibernate Reference Documentation but I've run into an issue with the List, eclipse seems to choke on it. I get an error that says:
List is a raw type. Reference to generic type List <E> should be parameterized
The List it mentions is from
import java.util.List;
The line in question is:

List stuff = psm.listPersistedStuff();
and the function declaration is:
private List listPersistedStuff()
I think some post Java 5 generics stuff is getting in the way. I've never used generics before and I guess I'll be learning quickly :). But if anyone knows what's wrong here, I would appreciate a pointer or two. Some of the Sun forums talk about suppressing the warnings in the function, but they also suggest that is a poor way to get around the problem. So I am not going to.

My JDK in case anyone is wondering is 1.6.