• Post Reply Bookmark Topic Watch Topic
  • New Topic

classpath setting  RSS feed

 
Sham Jowsaki
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Am new to unix environment. I have an .jar files in my directories. lets say (/export/home/jowsaki/lib/*.jars).
I need to set classpath for all jars which is available in the above directory.
I need to create a .sh file which contains setting of classpath.
pls help me out... and how to run.
thanks
jowsaki
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try something like for bash/ksh:
Put this in a file, jarclasspath.sh

Execute like this:
. ./jarclasspath.sh /export/home/jowsaki/lib
Notice the point at the start of line!
Then do:
export CLASSPATH=$JAR_CLASSPATH:$CLASSPATH
[ February 06, 2003: Message edited by: Barry Gaunt ]
 
Sham Jowsaki
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Barry Gaunt:
Try something like for bash/ksh:
Put this in a file, jarclasspath.sh

Execute like this:
. ./jarclasspath.sh /export/home/jowsaki/lib
Notice the point at the start of line!
Then do:
export CLASSPATH=$JAR_CLASSPATH:$CLASSPATH
[ February 06, 2003: Message edited by: Barry Gaunt ]


Hi Barry
am gettin the following error
ls: /*.jar: No such file or directory
JAR_CLASSPATH=: is not an identifier
am make sure that i have a jar files in lib directory.
Pls help me out
thanks
jowsaki
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!