Plugins (1059)


Training and Consulting (44)



EPIC Poll

What is your favourite developer portal?

[ Results | Polls ]

Votes: 541
Comments: 0

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ganked
Post subject: Runtime error – Imported libraries not included in package  PostPosted: Aug 10, 2005 - 07:45 AM



Joined: Aug 10, 2005
Posts: 1

To anyone that can help me,

I have developed an application in J2ME using Eclipse 3.1.0 and the J2ME Wireless Toolkit 2.2 etc all configured correctly. I am successfully building my MIDlet and emulating the application on the DefaultColourPhone. In one of my classes I have imported some specific class libraries so that I can perform some XML parsing. These are imported as shown below at the top of the file.

import org.kxml.*;
import org.kxml.parser.*;
import org.kxml.parser.XmlParser;

I then go into the Project -> Properties, click on the Libraries tab and have tried including the libraries from an external JAR as well as “Add class folder”. When I added a class folder I created a new directory in the project directory called “lib” and extracted the ZIP file of the library files into this folder. Then going into Eclipse I add the using the “Add class folder” option. This works as it should. Eclipse build’s the application without any errors or warnings and can see the libraries attached to the package. Even under the build Order and Export properties, the kxml libraries are listed.

Yet for some reason, whilst running the emulator and calling the constructor to XmlParser, the application halts and the following error message is displayed in the console window:

java.lang.NoClassDefFoundError: org/kxml/parser/XmlParser


I am lost as to why the build is reporting no errors and Eclipse can see the imported libraries without a problem, but when I run the application I get this message. I have searched high and low without any haven’t found anything explaining why this might be happening.

I also thought that it might help if I posted an image of my project file hierarchy that it might shed some light on this problem.

Image

I would greatly appreciate any information anyone can supply.

Regards
GaNkEd.
 
 View user's profile Send private message  
Reply with quote Back to top
Guest
Post subject: RE: Runtime error – Imported libraries not included in pac  PostPosted: Sep 14, 2005 - 07:12 AM






I had the exact same problem with the exact same library. It seems that Eclipse has problems with letting you reference third party libraries. See this url for a simple solution:

http://www.dcs.gla.ac.uk/~huttona/npd/PSEUDOREADME.TXT

It worked fine for me
 
   
Reply with quote Back to top
Guest
Post subject: Re: Runtime error – Imported libraries not included in pac  PostPosted: Nov 15, 2005 - 09:48 AM






i have the same prolbem and still remain unsolved.
i'm a newbie;can anybody help me more in detail? thanks!


ganked wrote:
To anyone that can help me,

I have developed an application in J2ME using Eclipse 3.1.0 and the J2ME Wireless Toolkit 2.2 etc all configured correctly. I am successfully building my MIDlet and emulating the application on the DefaultColourPhone. In one of my classes I have imported some specific class libraries so that I can perform some XML parsing. These are imported as shown below at the top of the file.

import org.kxml.*;
import org.kxml.parser.*;
import org.kxml.parser.XmlParser;

I then go into the Project -> Properties, click on the Libraries tab and have tried including the libraries from an external JAR as well as “Add class folder”. When I added a class folder I created a new directory in the project directory called “lib” and extracted the ZIP file of the library files into this folder. Then going into Eclipse I add the using the “Add class folder” option. This works as it should. Eclipse build’s the application without any errors or warnings and can see the libraries attached to the package. Even under the build Order and Export properties, the kxml libraries are listed.

Yet for some reason, whilst running the emulator and calling the constructor to XmlParser, the application halts and the following error message is displayed in the console window:

java.lang.NoClassDefFoundError: org/kxml/parser/XmlParser


I am lost as to why the build is reporting no errors and Eclipse can see the imported libraries without a problem, but when I run the application I get this message. I have searched high and low without any haven’t found anything explaining why this might be happening.

I also thought that it might help if I posted an image of my project file hierarchy that it might shed some light on this problem.

Image

I would greatly appreciate any information anyone can supply.

Regards
GaNkEd.
 
   
Reply with quote Back to top
quintopia
Post subject: RE: Re: Runtime error – Imported libraries not included in  PostPosted: Jun 05, 2006 - 01:29 AM
Guest





I'm having the same problem with a different package (motorola iden api), but the recommended solution isn't simple when you're working in windows (sym-links are out of the question). any other ideas? using eclipse 3.1 and eclipseme 1.5.
 
   
Reply with quote Back to top
Guest
Post subject: Problem solved  PostPosted: Jun 14, 2006 - 12:41 PM






Problem solved.

Go to the project properties>Java Build Path>"Order and Export" tab and check the kXML library you added before in the "Libraries" tab. Simple as that.

It worked for me.
 
   
Reply with quote Back to top
guest
Post subject: RE: Problem solved  PostPosted: Jul 22, 2006 - 08:25 AM
Guest





that too doent solve my problem
 
   
Reply with quote Back to top
bugmenot
Post subject: RE: Problem solved  PostPosted: Jan 03, 2007 - 01:12 PM



Joined: May 23, 2006
Posts: 5

beside checking the library in "order and export", make sure you copy and paste you library as well as you classes to the "verified" folder accordingly...
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits