Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please tell me how to set class path

 
Arul Jose
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Arul Jose
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranch,

Thank you for your reply. it helped me.

jose.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic