×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    errors compiling demo codes

    Dear Friends,

    I have tried without success to compile the codes available on this page:
    http://wiki.forum.nokia.com/index.ph..._%28NFC%29_tag

    I'm using Sun Java Wireless Toolkit, and prior to this example i managed to compile another piece of code from another site, so i believe i have it set up correctly.

    I get this error message when compiling:

    C:\WTK2.5.1\apps\ReadSerial\src\ReadSerial.java:1: package javax.microedition.contactless does not exist
    import javax.microedition.contactless.ContactlessException;
    ^
    C:\WTK2.5.1\apps\ReadSerial\src\ReadSerial.java:2: package javax.microedition.contactless does not exist
    import javax.microedition.contactless.DiscoveryManager;
    ^
    C:\WTK2.5.1\apps\ReadSerial\src\ReadSerial.java:3: package javax.microedition.contactless does not exist
    import javax.microedition.contactless.TargetListener;

    .......... an so on

    I'm a bit surprised this message pops up, since i've installed the
    toolkit, doesnt it mean that the packages should have been correctly
    configured as well?

    Any help will be appreciated!!

    Dev

  2. #2
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Re: errors compiling demo codes

    Hi,
    just for more info,

    I managed to compile this code
    http://developers.sun.com/mobility/m...lloMIDlet.java

    Which also imports javax.microedition

    So i guess its the javax.microedition.contactless that is giving the problem...

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Re: errors compiling demo codes

    after doing some more research, i beleive that even tho i have installed the Nokia 6131 NFC SDK, the contactless APIs are still not recognized/showing up.. i believe this to be the issue... is there any way to rectify?

  4. #4
    Nokia Developer Expert
    Join Date
    Oct 2005
    Posts
    21

    Re: errors compiling demo codes

    Hi,

    It seems that you have not used the Nokia 6131 NFC SDK to build your midlet. As current WTK does not support JSR-257 you cannot compile the NFC midlet using WTK alone.

    You did not say how are you compiling your sources, but if you are using the graphical UI of Wireless Toolkit you must select Nokia 6131 NFC SDK from the "Device:" -dropdown box. After that WTK uses libraries of our SDK to compile the midlet.


    In case it is not available in dropdown, you have to copy the whole Nokia 6131 NFC SDK directory (by default C:\Nokia\Devices\Nokia_6131_NFC_SDK_1_1) under \wtklib\devices in your WTK installation directory.

    Hope this helps.
    Last edited by samuuh; 2007-07-03 at 12:17.

  5. #5
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Re: errors compiling demo codes

    hi, as a matter of fact, i am using WTK to compile the codes.
    I tried copying the folder into my WTK directory and now i can see it there, but when i compile, the same errors appear although the emulator being used now is the Nokia 6131 emulator..

    is there any other tool or ide i should use to compile my codes? i'm at my wits end.......

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Re: errors compiling demo codes

    Hi, i managed to make it build successfully by choosing the Nokia 6131 NFC SDK as the default device, now build is successful, but there are some other errors when trying to run

    1st error

    Emulator: Missing JAR file.
    Emulator command: C:\WTK2.5.1\wtklib\devices\Nokia_6131_NFC_SDK_1_0\bin\emulator.exe -Xdescriptor "C:\WTK2.5.1\apps\ReadSerial\bin\ReadSerial.jad"
    Emulator: Missing JAR file.
    Emulator command: C:\WTK2.5.1\wtklib\devices\Nokia_6131_NFC_SDK_1_0\bin\midp.exe -Xdescriptor "C:\WTK2.5.1\apps\ReadSerial\bin\ReadSerial.jad"

    I guess this is because i didnt create the JAR/JAD files, so i selected Project-->Package-->Create package to create the necessary files and i tried to run again, this time i got this error:

    Build complete
    WARNING: Attribute value for MicroEdition-Profile defined in JAR manifest is not supported.
    Emulator command: C:\WTK2.5.1\wtklib\devices\Nokia_6131_NFC_SDK_1_0\bin\emulator.exe -Xdescriptor "C:\WTK2.5.1\apps\ReadSerial\bin\ReadSerial.jad"
    WARNING: Attribute value for MicroEdition-Profile defined in JAR manifest is not supported.
    Emulator command: C:\WTK2.5.1\wtklib\devices\Nokia_6131_NFC_SDK_1_0\bin\midp.exe -Xdescriptor "C:\WTK2.5.1\apps\ReadSerial\bin\ReadSerial.jad"

    Any ideas how to solve thiS?

  7. #7
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Re: errors compiling demo codes

    Solved!!
    apparently in the JAR & MF (manifest) files,
    the MIDP version was 2.1

    i just manually changed to 2.0 and it works lol

  8. #8
    Registered User
    Join Date
    Dec 2007
    Posts
    1

    Re: errors compiling demo codes

    Hi,how did you change the MIDP version in JAR files?...i comes with the encrypted letters..
    Any help please?

  9. #9
    Registered User
    Join Date
    Oct 2006
    Posts
    182

    Re: errors compiling demo codes

    hi pavan,

    open the associated JAD file and change the parameter MicroEdition-Profile: MIDP-2.0 according to your need.

    you cant change the MIDP vesrion in JAR files.

    hope this helps
    Sunil

  10. #10
    Registered User
    Join Date
    Aug 2009
    Posts
    1

    Re: errors compiling demo codes

    Dear all,

    You can also try to run it with the 6212_NFC_SDK platform and with MIDP 2.0
    And adding the following optional packages:
    Contactless Communication API 1.0
    File Connection and PIM Optional Packages 1.0
    JSR-257 API Extensions 1.0

    Hope it helps.

Similar Threads

  1. codes
    By xerxer in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2002-07-04, 11:52
  2. codes
    By xerxer in forum Mobile Java General
    Replies: 0
    Last Post: 2002-06-27, 14:29
  3. codes
    By xerxer in forum Nokia M2M
    Replies: 0
    Last Post: 2002-06-27, 14:28
  4. error correcting codes
    By xerxer in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2002-06-27, 14:25
  5. error correcting codes
    By xerxer in forum Bluetooth Technology
    Replies: 0
    Last Post: 2002-06-27, 14:20

Posting Permissions

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