The Code has been moved to BitBucket
So follow this link:
Instructions below here are now outdated (DO NOT READ)
Getting Started with JavaROSA Development
The repository is publicly accessible with read-only permissions. For write permissions, please contact a member of the javarosa-developers community.
For Unix(Linux and Mac OS) developers, go to http://code.dimagi.com/JavaRosa/wiki/JavaRosaOnUnix
Setting Up the Development Environment
Several of these installs are not small, make sure you are on a stable connection when you try to download them. Please use the versions listed below to avoid problems.
- Install Java Standard Edition Development Kit (JDK) 5.0
- We recommend the the JDK 5.0 Update NN link. It is the third download button from the top.
- Install Sun Java Wireless Toolkit for CLDC v 2.5.2_01.
- Install to the non-default location of C:\WTK2.5.2.
- Install Eclipse IDE for Java Developers
- Install EclipseME v1.7.9 J2ME plugin
- Install Subclipse v1.6 Subversion plugin
- Install all required projects under Subclipse.
- Install J2ME-Polish v2.0.4.
- Set the WTK directory during the install process to C:\WTK2.5.2.
- Install J2MEPolish to a directory of your choice, for example: C:\Program Files\J2ME-Polish
- Configure Eclipse to support Polish.
- Define a new classpath variable called J2ME_POLISH_HOME (Window->Preferences->Java->Build Path->Classpath Variables) and set its value to the installation directory of J2MEPolish
- Set your default JRE in Java->Install JREs points to a JDK not a JRE.
- Restart Eclipse.
- Optional: Install any vendor-specific SDKs you may be interested in.
Setup J2ME in Eclipse
- In Eclipse, go to Window -> Preferences.
- Select the J2ME node, go to Device Management, and select Import.
- Specify C:\WTK2.5.2 as your search directory, select Refresh and upon completion, select Finish.
- Double click each device listing and edit the group to read 'Sun Java(TM) Wireless Toolkit 2.5.2 for CLDC'
- Select DefaultColorPhone (or another phone of choice) as your default.
- Restart Eclipse.
- Optional: If you installed any vendor-specific SDKs, you can import them now.
Getting the Code
JavaRosa's code base is split into a large number of individual projects, each of which is named by the lowest common namespace for the source files in each project. For instance, the project org.javarosa.communication contains the transport layer code for transporting data on and off of the device. All of the projects used by a JavaRosa application should be checked out into their own projects into the same directory. This process is automated by the Team Project Set file mentioned below.
- If you are creating a new workspace, follow "Setup J2ME in Eclipse" instructions above.
- Download the javarosa_workspace.psf which will be used by Eclipse.
- Open Eclipse and go to File -> Import.
- Under Team, select "Team Project Set" and click Next.
- Locate the Team Project File that you saved and click Finish.
Eclipse will automatically build your workspace and this may result in one error. This is caused by some difference in the preprocessing between EclipseME and J2MEPolish. It can be avoided by overwriting the FramedForm.class in your J2ME-Polish jar with the modified version attached at the foot of this page.
If the import fails, please follow the Alternate Checkout instructions below.
Building the Code
- The main project to use is org.javarosa.demo. It has dependencies to the other projects, enumerated both in its .classpath file, and its build.xml file.
- Open the org.javarosa.demo project.
- Open the build.properties file.
- Ensure the polish.home variable is set to the location of J2ME-Polish on your system.
- Ensure the wtk.home variable is set to the location of the Sun Wireless Toolkit on your system. Repeat for any vendor-specific toolkits.
- Set the app.class variable is set to the name of the MIDlet you wish to run.
- Right click on the build.xml file and select Run As -> Ant Build.
Alternate Checkout
If you continue to have problems with the Team Project file, follow the directions below to get a checkout of the code.
- In Eclipse, open the "SVN Repository Exploring" Perspective. This can be found in Window->Open Perspective->Other...
- Right click, and select "New->Repository Location"
- Enter the URL: http://code.dimagi.com/svn/JavaRosa
- Expand the node for the repository location
- Expand the node for 'trunk'
- Expand the 'javarosa' and 'j2merosa' directories
- Inside both the 'javarosa' and 'j2merosa' directories, select all of the "org.javarosa.*" projects by clicking on the first node under 'j2merosa' and then shift-clicking the bottom node. Then control-click the remaining "org.javarosa.*" projects under the 'javarosa' node.
- Right click on the selection and click "Checkout"
- On the next screen, hit Finish.
Troubleshooting Dev Environment
Troubleshooting the Development Environment
Set up Debugging
Now What?
- How to Contribute : Getting started contributing to the code
- Open tickets : Bugs to be fixed and new features we want added
Attachments
-
FramedForm.class
(11.5 KB) - added by routen
10 months ago.
modified j2ME-Polish class FramedForm
