This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes class path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "class path" Watch "class path" New topic
Author

class path

Tamana Joshi
Greenhorn

Joined: May 23, 2005
Posts: 21
hi all,
plz tell me how to set class path.
why we people do it?
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1817

See:

How To Set The Classpath in the FAQ.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
The CLASSPATH is an environment variable that a) tells the java compiler where to look for class files to import and b) it tells the JVM where to find class files to interupt.
How to set you classpath depends on the operating system you are currently working on. For more info read Your First Cup Of Java for the particular operating system on your computer
[ June 15, 2005: Message edited by: Nigel Browne ]
Henry Kaldera
Greenhorn

Joined: May 29, 2005
Posts: 9
in a windows machine

setpath=%path%;c:\jdk1.4.1_06\bin
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
sorry DIXX but dont you think it should be
set classpath=%CLASSPATH%;C:\..........
???
if i am wrong plz correct me.


Life called,so here I am.<br />Cheers<br />Niki.:-)
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
can someone explain to me in plain language how to set classpath for windows XP. I've looked at "how to set classpath in FAQ section, and it wasn't much help!

right now what i do is type in the entire path at the command promt before compiling.


Who dares, wins! (SAS motto)
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Did you see the section on

Instructions on Setting the CLASSPATH on different Operating Systems

For Windows XP/2000/NT

in the FAQ??

What part did you not understand?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
okay, this is what it says to type in the user variables window
CLASSPATH=C:\myfile\myjars\myjar.jar;C:\myclasses\here.

suppose the path to my classes is c:\program files\java\jdk1.5.0_03\bin

what would i then type in?
and how is this better than how i already access these files? in other words whats the reason for classpath?

(sorry if question sounds daft!)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: class path
 
Similar Threads
err message
Once again: Creating a jar-file
PATH
compiling servlet
Simple Program not working.