aspose file tools*
The moose likes Beginning Java and the fly likes please tell me how to set class path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "please tell me how to set class path" Watch "please tell me how to set class path" New topic
Author

please tell me how to set class path

Arul Jose
Ranch Hand

Joined: Jan 14, 2005
Posts: 131
please tel me how to set the classpath EXACTLY. im working in windows XP.

can we do it like this?
go to properties in 'my computer' and then add the current directory for the variable 'classpath'?

how else to do it?

jose.
Sanjaya Sugiarto
Ranch Hand

Joined: Mar 25, 2004
Posts: 229
Start > Settings > Control Panel > System > Advanced > Environment Variables > Than you can add a new variable (CLASSPATH -> where the actual workpsace is and JAVA_HOME -> home directory where you install java)


<a href="http://www.wi.hs-furtwangen.de" target="_blank" rel="nofollow">Business Information Technology - Hochschule Furtwangen University, Germany</a>
Arul Jose
Ranch Hand

Joined: Jan 14, 2005
Posts: 131
hi ranch,

Thank you for your reply. it helped me.

jose.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Alternatively, set it for the shell you run your java app in. (i.e. open a new DOS command window, and type SET CLASSPATH=[whatever]). This way your classpath is set only for the application to which it applies, not every application you subsequently run.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
And a third option! On the command that starts java, specify classpath with a -cp parameter.

This is typical of how I start things from bat files. Hmm, "arg" wasn't a very good name for the string I built, was it.

[ January 18, 2005: Message edited by: Stan James ]

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please tell me how to set class path