Game Programming Crash Course (for J2ME): Tools Setup

Koder & Ko logo
 
 
Home | Tools Setup | MIDlet | Background | Sprites | Collision Detection | User Input | Artificial Intelligence | Optimization
 
 
Koder & Ko

J2ME Tutorial
 

Getting a "toolbox" for J2ME development up and running was once a daunting task. Fortunately it has become very easy easier, even though the official documentation from various vendors still seem to serve only one purpose; to scare away newcomers.

I prefer to use Eclipse together with Carbide.j from Nokia. Please note: Your game will not be limited to Nokia phones, I just like Carbide.j, since it's easy to setup and easy to use. We are going to use Eclipse with EclipseME and the Wireless Toolkit from Sun.

Java

The foundation for our development tool chain is SUN Java. I suggest that you download the SDK from http://java.sun.com/j2se/1.4.2/download.html. It's the small link that says "Download J2SE SDK" in the middle of the page. Current filename is j2sdk-1_4_2_15-windows-i586-p-iftw.exe (for the online installation).

It will install the Java 2 SDK and Runtime Environment (JRE). Just press "next" all the way through the setup wizard and you'll be fine.

Eclipse IDE

Download "Eclipse IDE For Java Developers" from http://www.eclipse.org/downloads/.

Eclipse is very easy to install. All you have to do is open the .zip file and extract the "eclipse" directory to your harddrive, ie. copy it to c:\eclipse. I suggest you create a short-cut to eclipse.exe from your Desktop afterwards.

Sun Java Wireless Toolkit

Download "Sun Java Wireless Toolkit 2.5.1 for CLDC" from http://java.sun.com/products/sjwtoolkit/download-2_5_1.html. They might have released a newer one when you are reading this, in that case download the latest version.

When you have downloaded the setup package, run it, and press next. It will complain that you do not have a JDK installed, and say you will not be able to develop J2ME applications without this. Just ignore this warning. Take note of where you install it (it will default to c:\WTK2.5.1, which is fine). Click next a few more times, and the Wireless Toolkit (WTK) is installed.

EclipseME

Launch Eclipse. It will ask you to specify the workspace. Just press "OK". The welcome screen will show up.

I am sorry to say this, but installing EclipseME takes some effort to install. It is not hard, it just takes time. There's unfortunately no way around it. Instead of me giving out-dated instructions, I suggest you follow the instructions on the EclipseME site, and then come back to this tutorial afterwards.

EclipseME Install: You should do as described in "2. Installing via the EclipseME Update site" on the page, and just ignore the 1., 3. and 4. paragraphs. Afterwards complete the EclipseME Configuration. Please note you should only complete the "1. Import the Device Definitions" and "2. Change Eclipse's Debug Settings" paragraphs. Be aware that in the "Import Devices" window you should point it to c:\WTK2.5.1 or whereever you installed the Sun WTK and remember to press the "Refresh" button.

 
  I AM SORRY

Nokia used to offer a package called Carbide.j that allowed you to get up and running with 6 clicks on a "next"-button. It was real easy. By removing their excellent package, they now force you to spend half an hour setting up Sun WTK and EclipseME instead of developing games. I STRONGLY SUGGEST YOU NEVER DEPEND ON NOKIA DEVELOPER TOOLS, if you want to be productive instead of battling with new tools all the time.
 
 

Launch

Everything is now setup. We can now start developing.

Next Page: The foundation is laid out

 
 
 

Call +45 2078 7221 or write ave at koderko.dk

Koder & Ko | Nordre Fasanvej 166 | 2000 Frederiksberg | Denmark