Discussion Board

Results 1 to 3 of 3

Threaded View

  1. #1
    Super Contributor
    Join Date
    Apr 2003
    USA, CA

    FAQ (General issues) for Java discussion boards - read this before posting

    Q: I cannot get this midlet of mine working? Please HELP ME! Urgent!

    First check the Javadocs for that API (those are included in all SDK installations). There are also sample midlets and documentation available on Forum Nokia Web site (http://www.forum.nokia.com/main/reso...ion/index.html). And you can find wealth of information in here (Discussion Boards at http://discussion.forum.nokia.com) and on Sun’s JavaME web site (http://java.sun.com/javame). And finally check also Forum Nokia Technical Library at http://www.forum.nokia.com/document/...ary/index.html, which you can also download to your computer).

    If you are still having problems, please include relevant parts of the source code in your post, and also specify which devices you are working on. If the problem has something to do with your desktop computer, please add OS information for your desktop computer too. In some cases the firmware version of the device might provide valuable information to the readers (*#0000# in the idle screen).

    Q: What tools do I need to create my first midlet?

    You can write your code in your favorite text editor or you could use an IDE (Integrated Development Environment), such as Eclipse, Netbeans, or JBuilder.
    [Note: reference to Carbide.j has been removed as Nokia does not provide that tool anymore]

    When you use Sun’s Wireless Toolkit, NetBeans with Mobility pack, and other mobile Java development environments, you should remember that if you are developing your midlet for Nokia devices, it is advisable to test the application with Nokia emulators (as well as on real devices), as the generic emulators behave differently from Nokia emulators and Nokia devices.

    Q: I need to download Nokia Development Suite X.X for J2ME. Where can I find it?

    NDS was replaced with Carbide.j which has been also removed from the tools portfolio. Please use Eclipse ME or NetBeans with Mobility Pack for your MIDlet development

    Q: How can I transfer my midlet to the handset?

    On S60 phones and newer Series 40 phones: Send the JAR and JAD files over Bluetooth from the File Browser.

    On older Series 40 phones, you need to use PC Suite. PC Suite works well also with S60 and newer Series 40 phones.

    An advanced option is to store the JAR and JAD files on a Web server and connect to the JAD file using the phone browser. Make sure the mime types are set correctly on the server (“application/java-archive” for jar and “text/vnd.sun.j2me.app-descriptor” for jad).

    Q: How can I debug my midlet?

    All SDKs contain an emulator, which basically emulates the phone Java environment and the set of APIs included in that SDK on your PC. When you run your midlet in the emulator, you can see diagnostic information (like printStackTrace() output) in the IDE's console screen.

    You should always test your application on a real device as some of the phone capabilities cannot be emulated on PC. Also there are subtle differences in the phone implementations.

    Q: Why are there so many SDKs, can’t I just use one to code and test my midlet?

    Different phones have different set of APIs, and the SDKs provide a compatible set of APIs for each device (and an emulator to test the midlets on). Nokia devices are based on platforms (like Series 40, S60, and Series 80), editions (1st, 2nd, and 3rd edition so far), and Feature Packs. Each device belongs to one of platform edition / feature pack combination.

    For example if you are developing an application for N70 smart phone, which is a S60 2nd Edition Feature Pack 3 device, you should be using that specific SDK to develop the midlet on. If you are using an earlier SDK version, some of the APIs might be missing. If you are using a newer SDK version, you might end up using features which are not available on N70. Additionally the emulator of the S60 2nd Ed FP3 SDK provides the closest emulation of that specific device of all the available emulators.

    Q: What are the prototype SDKs?

    Prototype SDKs are meant for developers, who are targeting future devices. The prototype SDK contains a number of APIs which are not yet implemented on any device, but which will be available on future devices. With the Prototype SDK the developer can start developing his/her application before the devices are launched, so the midlet can be distributed to the marketplace earlier.

    The emulators of these Prototype SDKs are based on reference implementation of future devices, not on real device / platform software like in Platform SDKs. Hence the implementation of UI and new APIs might not be exactly the same as on real devices. Hence, always test your application on final SDKs and on real devices.

    Q: Does my handset support API xyz?

    Please check the device specifications at http://www.forum.nokia.com/devices

    You can also use a shortcut URL – add the phone model number in the end of the previous URL. For example if you want to see the specifications of Nokia 6131 phone you can go to this URL http://www.forum.nokia.com/devices/6131

    Or if you are looking for API availability on devices from other manufacturers, you can also check the J2ME Polish Device Database at http://j2mepolish.org/devices-overview.html or Tastephone MIDP phone info at http://www.club-java.com/TastePhone/...IDP_mobile.jsp

    For most of the newer APIs it is also possible to query the phone during execution time if a certain API exists. This is done using System.getProperty() method call. Please check the correct query strings (for example microedition.pim.version for PIM API) from this document http://www.forum.nokia.com/info/sw.n..._2_en.zip.html

    A special case is MMAPI, which contains a lot of optional features. For example not all phones are able to use the camera. You can check how the MMAPI is supported on various Nokia devices from this doc http://forum.nokia.com/info/sw.nokia..._0_en.pdf.html

    Q: My phone does not seem to have support for API xyz. Can it be added on the phone?

    Short answer: No.

    Longer answer: No, but if the API can be implemented on using the existing Java APIs on the phone, you can include the required class files in your midlet. This of course makes your midlet bigger and if you need to use the same classes in another midlet, you need to include the classes in that midlet too, as the classes of another midlet are not accessible from other midlets. Also note that in most cases this is not possible as usually the new API requires access to the system functions of the phone.

    Q: Can I read and write files on my mobile phone using a midlet?

    Yes, if your phone supports the FileConnection API, which is an optional package of JSR-75. Check also this introductory document and the example midlet included http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html

    Q: Can I access the address book /to-do list/calendar on my phone

    Yes, if your phone supports the PIM API, which is an optional package of JSR-75. Check also this introductory document and the example midlet included http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html

    Q: My midlet seems to be too big for my phone. How can I make my JAR files smaller?

    Obfuscation replaces the class and method names with short (1 character) names, which has the side effect of making the class files smaller. Originally obfuscation was intended to be a tool to make the reverse engineering of the midlet harder. One example of such tools is Proguard.

    If your application uses resource files (images, audio, or video), make sure they are optimized for the small devices (suitable bit depth, image resolution, audio bit rate, and so on.)

    You can also shave some bytes off your JAR-file by making the folder names really short.
    Last edited by hartti; 2007-07-09 at 07:23.

Similar Threads

  1. Can't access series 40 General number via JSR75
    By mottsc in forum Mobile Java General
    Replies: 16
    Last Post: 2009-02-27, 11:28
  2. socket read hangs until socket is closed
    By camroe in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-07-21, 09:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts