I have recently been dabbling with a bit of Blackberry development. When I started I was using the horrible antiquated, old netbeans based blackberry JDE (the ultimate insult, take a cross-platform java app and turn it into a Windows only app… don’t get me started!) from Parallels. This was painful, so I searched around the web to see if there was something I could do about it.
I happened across this great article on how to use Eclipse for Blackberry development, but the real interesting bit was that the screenshots where on a Mac!! Eureka!
The only bit I want to add to that is the setup of the Blackberry SDK that I did. In my workspace (the place I keep my development stuff, not the Eclipse workspace), I copied the SDK installation except the simulator (C:\Program Files\Research In Motion\BlackBerry JDE 4.3.1) from windows on to my Workspace(~/Desktop/Workspace). Note: I replaced the spaces with –
What I wanted to do now, was to have Eclipse, on the Mac able to publish directly to the simulator living in Parallels. This was painful because Parallels mounts the C drive to a different path on every run.
To solve this, I wrote the following script to find and mount the correct path and put it in ~/bin
c_path=/private`mount | grep fuse.*\/C | sed -e "s/^.*\/private//g" -e "s/C.*\$//g"`C
simulator_path=$c_path/Program\ Files/Research\ In\ Motion/BlackBerry\ JDE\ 4.3.0/simulator
rm -f “$local_jde_path/simulator”
ln -s “$simulator_path” “$local_jde_path/simulator
Now, to get this automatically re-linked every time I start Windows, I wrote this bat file that runs at login. This of course means that if you simply suspend the windows session you will have to manually run either the script above from the Mac or the one below form Windows.
Having downloaded Plink and placed it in C:\Program Files\Putty
call "C:\Program Files\Putty\plink.exe" -pw XXXXXXXX you@yourmac ~/bin/link-simulator
Then you put this batch file anywhere on your windows disk and create a shortcut to it in the Start->Programs->Startup (if you really want, you can probably have the batch file live there or create a windows shortcut containing the whole line w/o the call, I haven’t tried it but I imagine it must work)
If you don’t want to keep your password in the batch file you can do the ssh key dance, plink will support it via puttygen. Someday, when I get around to doing it, I will write a tutorial about this.