Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java Micro Edition and the fly likes Classpath Setting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Classpath Setting" Watch "Classpath Setting" New topic

Classpath Setting

Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143

I am working with J2ME 2.2 Toolkit and would like to know how to set the classpath if i am using any external API as a part of my MIDLet program.

Actually i have a JAR file that contains some package that i use it in my midlet and when i try to build the project i get package not found error.. i don't know where to change the bootclasspath / classpath setting..

It would be nice anyone could help me solve this problem

Thanx in advance

Ramender Mall
Ranch Hand

Joined: Sep 08, 2005
Posts: 311
hi roshni,

try copying the external jar package in the /lib directory of your PROJECT..
I have never added any external packages, but whenever I will do it, I will first try by placing it there..

[ December 28, 2005: Message edited by: Ramender Mall ]
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi Ramy,

It worked.. Thanx for the information, i tried placing it in the WTK22\lib folder.. i.e why i didn't get it right.. thanx a lot.

[ December 28, 2005: Message edited by: roshini sridhar ]
I agree. Here's the link:
subject: Classpath Setting
Similar Threads
How to run midlet?
Errror while compiling:Package doesn't exist
Classpath, packages, huh?
classpath setting problem
package javax.servlet not found in import