How to build Mobile programs in Pascal for Java Mobile using MIDletPascal

MAKE JAVA ME APPLICATIONS IN PASCAL WITH MIDLET PASCAL

THIS POST WILL SHOW YOU HOW YOU CAN DEVELOP YOUR OWN JAVA PROGRAMS FOR MOBILE PHONES IN PASCAL. WE CANNOT UNTIL NOW DEVELOP PROGRAMS FOR J2ME IN FREEPASCAL (AS OF FP V2.4.4). WE EITHER HAVE TO USE THE SUN JAVA WIRELESS TOOLKIT AVAILABLE FOR DOWNLOAD FROM SUN MICROSYSTEMS WEBSITE OR WE CAN USE MIDLET PASCAL TO DEVELOP A J2ME (JAVA2MICROEDITION) PROGRAM.



MIDletPascal is a Pascal language dialect specifically suited for development of mobile applications in the J2ME environment. MIDletPascal compiler translates Pascal code into Java™ micro edition (J2ME) bytecode. Programs written in MIDletPascal can be executed on any mobile device (such as mobile phones) supporting MIDP 1.0 and CLDC 1.0 platform. With MIDletPascal, developing mobile applications is easy and straightforward. If you are already familiar with any other Pascal language dialect you can start writing your own mobile applications within minutes. MIDletPascal comes with user-friendly IDE (integrated development environment) for Windows (working also in Linux and MacOS under WINE). The IDE interfaces with the compiler (which has a Java bytecode preverifier included) and has integrated a JAR archive builder so compiling and building MIDlets is as easy as a push of a button. Since MIDletPascal generates low-level Java™ bytecode, generated MIDlets have small footprint and run fast. Some similar tools that can be found on the Internet generate an intermediate code and pack it with an interpreter into a JAR file - that approach creates large JAR files for distribution and yields slow execution. MIDletPascal directly generates Java bytecode, so you don’t need Java compiler installed on your machine, and compile process is very fast.

Installing MIDlet Pascal:

Download Midlet Pascal from here. The Current Version at the time of writing this post is MidLetPascal V3.4 FINAL. So, download the Program and install it like so:

Click NEXT
Click FINISH

After finishing the installation, Click on FILE->NEW->PROJECT to open a new Midlet Pascal Project

Click FILE->NEW->PROJECT
Name the new project and Click OK

New Project Window
The Snapshot below shows one of the Core features of the MidletPascal IDE. It allows you to set the target and resources of your J2ME Application.

MidletPascal IDE Features - App Settings
Below is the snapshot of the Midlet Pascal Code Editor. You can change the background, font and theme of the Midlet Pascal IDE according to your preferences.

Midlet Pascal IDE Code Editor
 To Compile the Project, Click on Project->Compile Current file or press Shift and F7 at the same time.

Compile the Project
 You can view the Compile Log to view any error(s) or Compilation Success Message Logs.

Compile Log
To obtain the output J2ME Application (.jar) file,  Click on Project->Open Folder->Open BIN folder

Open the Project BIN Folder
The IDE will open the folder where the J2ME Application has been produced.

Get the Compiled J2ME Application

To run the resultant J2ME Application, copy both the JAR and JAD files to the Mobile Phone through Bluetooth and or USB Cable or test them on an emulator.

USB Cable
You can also download a copy of a J2ME Emulator called MicroEmulator. Please note that you will need Java Runtime Environment installed to run the Emulator.

Creating Simple MIDLet using MIDletPascal:

Found this post useful ? If so, Click +1 and RECOMMEND THIS SITE on Google

No comments:

Post a Comment