Running with Eclipse

There are several plugins you need before you start working on the projects. This section will explain on how to install and configure all of them. First make sure that the JavaME development toolkit is installed and accessible on your computer.

EclipseME plugin

You need to install EclipseME plugin. You'll find installation instructions here.

When EclipseME is installed you should configure it to use CLDC 1.0. Please go into Window / Preferences / J2ME / Device Management and select the MediaControlSkin profile (this profile is used by default by all BTW projects). Click the Edit button, then the Libraries tab. Remove the cldcapi11.jar, click Add, browse into the WTK2.2 directory, then into the lib directory and select cldcapi10.jar. Click OK, clean all projects and it should hopefully work :)

Subclipse plugin

Please install Subclipse plugin, an SVN support for Eclipse. There is a manual for installing the plugin into Eclipse. You should use the 1.1.8 (or newer version) because of the symlink support added. You'll find more details here. If you do not want to use experimental versions you may stick with 1.0.10, it is reported to be working okay.

Getting the project

There are two ways to get the project - first by getting an official release, second by checkouting the project from SVN. First, create a workspace in Eclipse (let's say /home/user/eclipse/btw) and then:

  • Get whole zipped eclipse projects simply by download the *-project.zip file from the SourceForge download link. Unzip the files into workspace then import them in Eclipse. If you are importing the BTLib project you need to strip the version name from the directory name, i.e. you need to rename the directory btlib-0.3 to btlib.
  • Use Eclipse's Import > Other > Project from SVN. SVN URL is publicly accessible at https://btw.svn.sourceforge.net/svnroot/btw. Right-click on the project-name/tags/version directory and select Checkout from the menu. Just checkout the project into the workspace directory.

Configuring Eclipse

Any game/application will require the BTLib project to be present in the same directory as the game/application project directory (the workspace directory). In order for the games/application projects to be able to access sources from the BTLib project you need to define a linked resources variable. Just go to Window > Preferences > General > Workspace > Linked Resource and create variable named BTW_WORKSPACE pointing into the workspace directory where the btlib project is located (just use the workspace directory like /home/user/eclipse/btw).