• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding external libraries on J2MEWTK

 
Horaci Macias
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to add external libraries to a project created with j2mewtk, placing .jar files under the project's /lib folder, but my project fails to build... the only way I've been able to do this is to add external library's source files under the project's /src folder, but there must be another way, or how can I add external libraries without having its sources ?
Thank you,
Horaci Macias
 
Liam Quinn
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using J2MEWTK 1.0.3 or an earlier version? Earlier versions didn't support external libraries.
If you're using 1.0.3, then some more details may be helpful, such as what the build failure is.
 
Horaci Macias
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I'm using v1.0.3, and I'm trying to use kXML as an external library. I've placed kXML.jar under my app's /lib dir, build results are shown:

I've tried to extract kXML.jar and the same build problem occurs... the only reference in kXMLTest.java to kXML is an import
Thank you,
Horaci Macias
 
Derek Smith
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem. Just putting the package into the same directory structure is not enough...you also have to reference it in the MIDlet Suite that is created.
I use Forte with the J2METK add-in. In there, right click on the MIDlet Suite, select open, and on the 'Content' tab, make sure the directory for kXML is added to the 'Chosen Content' list.
I know this worked for kXML, and I suspect it would be the same for other external libraries.
 
Horaci Macias
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been looking for a similar feature in j2mewtk standalone but I still haven't found it. Does anybody know how to do add external libraries with j2mewtk standalone ?
Thank you,
Horaci Macias
 
Horaci Macias
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help! Does anybody know how to add external libraries with j2mewtk 1.0.3 standalone? (not integrated with Forte)
Thank you,
Horaci
 
Pooja Rao
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I dont know what you are trying to do in your code, but if you are parsing the xml data with kxml...u need to include these two statements
import org.kxml.*;
import org.kxml.parser.*;
check it out!!
PR
 
Horaci Macias
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code is an empty main method, the only reference it has to kXML is import org.kxml.*;
I get errors trying to compile this, so I really don't think the 2nd import (org.kxml.parser.*) has something to do in this case... I think I would get a NoClassDefFound exception if I miss the import, but that's not the case....
Thank you anyway... any other help ?
Horaci Macias
[ February 27, 2002: Message edited by: Horaci Macias ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic