Multiple midlets in wireless-app
1 posts in topic
Flat View  Flat View

Posted By:   juan_uys
Posted On:   Tuesday, June 10, 2003 07:06 AM

The wireless app (midp1.0) has 2 classes (main midlet and a helper class). If I download it to a phone, it shows both files on the phone.

What can I do to make the client/cellphone only "see" the main class file?

The phone would show my app (with the designated icon) and the other class file (with the handset's default icon)


Re: Multiple midlets in wireless-app

Posted By:   Anonymous  
Posted On:   Tuesday, June 17, 2003 09:53 PM

You are new to J2ME aren't you? Well, I'm new too. But I hope the following helps.

Basically, you need to package the class files into a jar file. You can easily achieve this by using Sun's J2ME Wireless Toolkit at http://java.sun.com/j2me/download.html

After you had started the kToolbar, click on the 'New Project' button. Enter the name of your project (will be displayed on your mobile phone) and the name of your main midlet class file. Then click 'Create Project'.

You will be presented with with another window. This window will provide information to your mobile phone regarding your midlet(s) and you need to enter it yourself if you going to package the jar file yourself. Click 'ok' for now and you're done.

The text area of the kToolbar will be filled with information. Java source files is the location where you place all your source files including your main midlet. Resource files is where you place your resources such as icon for your midlet. So now you just have to copy the files into the correct folders.

After you have completed that. Click 'build' button. If there are no error(s), you just finish the final step; go to 'Project'->'Package'->'Create Package' and you're done.

Assuming the the wireless toolkit is installed at "C:Wtk104", you can access your jar package at "C:wtk104appsyourwirelessappin" folder.

I think you need to upload both the *.jar and *.jad files onto your mobile phone.

If you want to do it manually, you have to take a look at the JAD (Java Application Descriptor) file and the Java manifest files (Manifest.mf) using notepad. The manifest file is located inside the "meta-inf" folder inside the package. You can open the package using winzip as it is a zip file. Remember the settings window in the kToolbar? You can access it again by clicking on the 'settings' button. Compare it with your JAD and manifest files and you should have some general idea.

Phew! That's all.

About | Sitemap | Contact