×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    24

    j2me jar file import to another j2me application

    Hi


    I have build a jar file.I want this jar file to be used in another project.I have imported the jar file(in add resource option) in the project ,but how can i import the class of the jar in the project.

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: j2me jar file import to another j2me application

    Quote Originally Posted by prakashohile View Post
    Hi


    I have build a jar file.I want this jar file to be used in another project.I have imported the jar file(in add resource option) in the project ,but how can i import the class of the jar in the project.
    Welcome to the Nokia Developer Boards,

    You just need to add the jar file inside the build path of the application. Using either of the IDE's that's pretty simple. After the settings has been done, you need to just use the classes which are wrapped inside the jar. Just create some class and then you can simply use the jar's classes, probably type the name of the class which is inside jar and import the same.

    Check and revert in case of any issues.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    24

    Re: j2me jar file import to another j2me application

    Hi raj_j2me

    Thanks for your reply.


    But i am not clear what your idea is.So please give me some detailed explanation for the above reply.

  4. #4
    Nokia Developer Moderator
    Join Date
    Dec 2011
    Posts
    174

    Re: j2me jar file import to another j2me application

    Hi prakashohile,

    If you are using Eclipse choose from project 'properties->Java Build Path->Libraries->Add External Jar' and add your jar file there. Also add your class files to 'properties->Java Build Path->Libraries->Add External class folder' .

    -tiviinik

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: j2me jar file import to another j2me application

    Quote Originally Posted by prakashohile View Post
    Hi raj_j2me

    Thanks for your reply.


    But i am not clear what your idea is.So please give me some detailed explanation for the above reply.
    Create your own class, and import the class you wanna use from jar. that's all.
    Or if you are using some IDE's then you just type the name of the class which is in jar, and press ctrl+space,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  6. #6
    Registered User
    Join Date
    Jun 2011
    Posts
    24

    Re: j2me jar file import to another j2me application

    I am using netbeans IDE ,i typed the class name in my jar and pressed ctrl+space ,but it shows that "no suggestion".

  7. #7
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: j2me jar file import to another j2me application

    Quote Originally Posted by prakashohile View Post
    I am using netbeans IDE ,i typed the class name in my jar and pressed ctrl+space ,but it shows that "no suggestion".
    Probably your file is not correctly configured, try these steps out;
    1. Go to project properties by right clicking on project.

    2. Then click on Libraries tab, You will see Compile, Run, Compile Tests, Run Tests tabs.

    3. Click on Compile tab

    4. Click on Add JAR/Folder button at right

    5. Then browse and select the jar files or folder which you want to include. Included jar files or libraries will show on the following box of Compile tab.

    6. Click on OK button.

    7. Finished.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  8. #8
    Registered User
    Join Date
    Jun 2011
    Posts
    24

    Re: j2me jar file import to another j2me application

    ok thanks raj it works.

  9. #9
    Registered User
    Join Date
    Apr 2012
    Posts
    4

    Re: j2me jar file import to another j2me application

    Helow.

    i make what you write.

    I always get this error:

    Starting emulator in execution mode
    []
    JVMJNCK001I JNI check utility installed. Use -Xcheck:jni:help for usage
    IBM J9 2.3 Symbian x86-32 (JIT enabled)
    J9VM - 20081015_24516_lHdFGV
    GC - 200810_03
    MIDlet: HelloMapMidlet
    Exception in handleDisplayableEvent. Reason: NullPointerException
    source is : Datoteke.HelloMapMidlet$1@366e366e
    p0 is : 360
    p1 is : 240
    p2 is : 0
    java.lang.NullPointerException
    at com.nokia.maps.map.MapCanvas.sizeChanged(Unknown Source)
    at javax.microedition.lcdui.Displayable.sizeChangedEvent(Displayable.java:263)
    at javax.microedition.lcdui.Canvas.sizeChangedEvent(Canvas.java:755)
    at javax.microedition.lcdui.Displayable.handleEvent(Displayable.java:163)
    at javax.microedition.lcdui.Canvas.handleEvent(Canvas.java:644)
    at javax.microedition.lcdui.Toolkit.handleDisplayableEvent(Toolkit.java:483)
    at com.symbian.lcdjava.lang.SystemExtensions._dispatchCallbacks(Native Method)
    at com.symbian.lcdjava.lang.SystemExtensions.dispatchCallbacks(SystemExtensions.java:35)
    at com.symbian.midp.runtime.KVMEventProcessor.run(KVMEventProcessor.java:23)
    -VM verbose connection exited

    I would like to try the Location APIs for JavaME, and I take this example:
    http://www.developer.nokia.com/Devel...amples/#search

    Please, help

    Thank you!

Similar Threads

  1. XML file in j2me application
    By kusumat in forum Mobile Java General
    Replies: 9
    Last Post: 2012-12-27, 07:20
  2. application error with 3gp file in J2ME
    By ruchig_iic in forum Mobile Java Media (Graphics & Sounds)
    Replies: 10
    Last Post: 2012-01-16, 21:40
  3. what are the import packages are used in j2ME for Symbian OS?
    By venu s in forum Mobile Java General
    Replies: 1
    Last Post: 2011-08-23, 18:19
  4. How to view File Content from the J2ME application?
    By neeraja.nokia in forum Mobile Java General
    Replies: 4
    Last Post: 2009-05-30, 23:13
  5. j2me application for sending file via bluetooth
    By success_anil in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-04, 11:50

Posting Permissions

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