954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

classpath

Hi

I am using Nokia SDk for J2me and am trying to compile. I do not know how to set the classpath. I set it by going to Control Panel -> System->advanced->Environment Variable. There I clicked on the Edit button after selecting the "CLASSPATH" variable

My classpath is "C:\WINNT\System32\QTJava.zip;C:\Nokia\Devices\Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1\lib\Series_60_MIDP_SDK_for_Symbian_OS_v_1_2_1\j2me-debug.zip"

BUt I am still getting the errors "cannot find symbol"

Please help

Thanks
Ramya

ramya_rav2000
Newbie Poster
3 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Should I restart the system for the classpath to take effect?

ramya_rav2000
Newbie Poster
3 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

that depends on your operating system.
At the least you must restart your terminal windows and Java based applications for them to see the change.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

You know, if you are invoking javac and java from a command (DOS) terminal, you can override the environment classpath on the command line by saying:

C:/> javac -classpath c:/blah/blah/blah;

and

C:/> java -classpath c:/blah/blah/blah;

where the "c:/blah/blah/blah;" business is your classpath. If you want to check that your classpath is what Java "thinks" the classpath is, write a simple program which does the following:

public class CheckClasspath {[INDENT]public static void main(String[] args) {[INDENT]System.out.println(System.getProperty("java.class.path"));
[/INDENT]}
[/INDENT]}


That ought to print what Java has registered as the classpath at runtime.

G-Do
Junior Poster
147 posts since Jun 2005
Reputation Points: 41
Solved Threads: 31
 

Hi

Thanks a lot
I got it to work. I had to specify the -bootclasspath before I cud get it to work as I am using J2ME

Thanks
ramya

ramya_rav2000
Newbie Poster
3 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

cud: ball of partially digested vegetable matter regurgitated by hooved animals.

What's that to do with Java?

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You