Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Easy Emulation With New NetBeans Mobility Pack 4.0

With the click of a button, switch back and forth between different emulation environments while developing one set of code. It's never been this easy to take advantage of Java technology's cross-platform capabilities.

Tutorial Details:

Introduction


NetBeans Mobility Pack 4.0 is an integrated development environment (IDE) designed to support mobile application developers throughout the whole development cycle. Because it is exactly aligned with United Emulator Interface specifications, the Mobility Pack allows developers to move from one emulation to another much more easily than before. Plugging in UEI-compliant emulators is virtually automatic.

John Muchow, the Mobility Tools Architect for Sun Microsystems, says this tool offers advantages over others in the market.

"We've essentially created a direct plug-in for NetBeans," he says. "We're not a third-party tool. The same people who created NetBeans are the same people who created the J2ME plug-in for mobility, so it is integrated, offers better support, goes through the same quality process and so on." It's also, he continues, the best tool available for managing device fragmentation. "Instead of being a tool that you can do J2ME in, it's a Java development tool that has specific features tailored to J2ME developers."

Karel Herink, a software engineer and developer for Sun Microsystems in Prague, is a part of the team that developed NetBeans Mobility Pack 4.0. He says this tool works behind the scenes to complete much of the work necessary for developers to switch back and forth between different emulation environments. When creating applications for mobile phones, he says, developers can open up the IDE and type code into a template. The IDE compiles the sources, does preverification, which shrinks the compiled product to a smaller form that fits on the phone, and then it can also package the product or the compiled code.

"So basically you type in the code, you hit a button and there's a process underneath it the developers don't need to concern themselves with. We compile the code, we preverify it, we JAR it up and then we create another file that's the JAR descriptor (JAD). And with those two components you're able to deploy the app on the phone or in the emulator. It's really very easy."

Here's how to use it.

How To Plug In A UEI-Compliant Emulator


First download and install the NetBeans 4.0 integrated development environment (IDE), then download and install NetBeans Mobility Pack 4.0 on top of it. Once both are installed, launch the IDE. NetBeans Mobility Pack 4.0 already contains UEI-compatible emulators from the J2ME Wireless Toolkit 2.2 platform.

What is UEI?
The Unified Emulator Interface (UEI) allows Integrated Development Environments (IDEs) to use a single interface (API) to support device emulators from various companies.

To plug in additional UEI-compatible emulators, first download the emulator. Once an emulator is downloaded the IDE will tell you if it's UEI-compliant or not. If the emulator is UEI-compliant, the IDE automatically detects what kinds of devices it will emulate, what APIs are supported, along with some additional information and presents it all in a nice user interface (UI). Also, says Herink, the IDE can detect when developers try to write an application for a phone that uses, for example, Bluetooth, but the emulator they're using doesn't have the Bluetooth API installed. In cases like this, the IDE will automatically detect this discrepancy and show the developer exactly what this emulator supports and enable the developer to manage any necessary changes more simply.

Says Herink: "You might want to write an app for CNET, for Nokia, for different phones, and if one phone supports an API and a different phone doesn't support an API, then we do all the class path management and make sure everything complies with the appropriate APIs. It can get confusing sometimes if you're working with 20 different phones at the same time – they can be so different. Our IDE really makes it easier to use different emulators because you can look at it and immediately know what's supported and what's not."

Platform vs. Device
A note about the difference between an emulator platform and a device: A platform can contain many devices within it, or only one. For instance, you can see that the "J2ME Wireless Toolkit 2.2 platform", which is pre-installed, provides four emulator devices: "DefaultColorPhone", "DefaultGrayPhone", "MediaControlSkin", and "QwertyDevice".

For this example we will use a Nokia emulator found at http://www.forum.nokia.com/main/0,6566,034-2,00.html. After downloading the emulator, install it.

Start the IDE. In the main window select "Tools->Java Platform Manager". You will see two installed platforms: J2ME Wireless Toolkit 2.2 and Default Platform. Click the "Add Platform" button and browse to the Nokia emulator installation directory. Select "Nokia_6230_MIDP_Concept_SDK_Beta_0_2" and click "Next".

A new platform will be detected and the next panel will show you more details about it such as name, type, configuration, profile, list of optional APIs, and a list of devices such as the actual emulators provided by the platform.

By now you will see that the platform is called Nokia 6230 MIDP Concept SDK Beta 0.2, and it provides one emulator device called Nokia 6230 MIDP Concept SDK Beta 0.2.

Click "Finish" and you will be taken back to the "Java Platform Manager" where you will notice that the platform "Nokia_6230_MIDP_Concept_SDK_Beta_0_2" has been added and contains one device: "Nokia_6230_MIDP_Concept_SDK_Beta_0_2".


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Easy Emulation With New NetBeans Mobility Pack 4.0

View Tutorial:
Easy Emulation With New NetBeans Mobility Pack 4.0

Related Tutorials:

The Volano Report: Which Java platform is fastest, most scalable? A JavaWorld exclusive! - JavaWorld - Mar
The Volano Report: Which Java platform is fastest, most scalable? A JavaWorld exclusive! - JavaWorld - March 1999
 
The state of Jini technology - JavaWorld
The state of Jini technology - JavaWorld
 
JavaWorld December 1999
JavaWorld December 1999
 
Product Review: Kawa 4.0 - JavaWorld June 2000
Product Review: Kawa 4.0 - JavaWorld June 2000
 
Solid JRun serves up Java on a budget - JavaWorld June 2000
Solid JRun serves up Java on a budget - JavaWorld June 2000
 
Object mobility in the Jini environment - JavaWorld January 2001
Object mobility in the Jini environment - JavaWorld January 2001
 
Finalists announced for JavaWorld Editors' Choice Awards
Finalists announced for JavaWorld Editors' Choice Awards
 
Will Big Blue eclipse the Java tools market?
Will Big Blue eclipse the Java tools market?
 
Ilog JRules 4.0: Working by the rules
Ilog JRules 4.0: Working by the rules
 
Remote-control Java
Remote-control Java
 
Sun boosts
Sun boosts enterprise Java
 
Java tools reign supreme - JavaWorld celebrates the leading Java tools
Java tools reign supreme - JavaWorld celebrates the leading Java tools
 
NetBeans - XSLT Editor
NetBeans - XSLT Editor
 
J2ME Technology Turns 5!
In 2004 the Java 2 Platform, Micro Edition (J2ME) celebrated its fifth anniversary. This article presents where J2ME is today.
 
Develop MIDlets using the J2ME MIDP Development for NetBeans IDE 4.0
This release integrates with the J2ME Wireless Toolkit 2.2 to create a powerful environment for developing MIDP 2.0 applications.
 
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's.
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's. Mandrake 10.1 Power Pack Linux Now Available Mandrake 10.1 Power Pack CD's Power Pack is a Linux system that will appeal to all advanced users. It's great for Office
 
Simredo 4.0 - Java Unicode Editor
Simredo is a free Java Unicode editor.
 
NetBeans IDE 4.1
Out-of-the-box support for J2EE 1.4 and Web Services. Check out what early access release 2 can do for you!
 
Chat Transcript: Solving the Device Fragmentation Problem
Read the questions that your fellow developers had about the new feature in NetBeans Mobility Pack 4.0 that helps solve device fragmentation problems, and the answers straight from the engineers who created the module.
 
Easy Emulation With New NetBeans Mobility Pack 4.0
With the click of a button, switch back and forth between different emulation environments while developing one set of code. It's never been this easy to take advantage of Java technology's cross-platform capabilities.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.