Connexxion : Connecting Life with Technology

Byte by Byte Impressions on Technology, People and Process !

QuickTip: Setting CLASSPATH on linux

Posted by vikashazrati on Wednesday, August 8, 2007

For bash shell:
vhazrati@vhazrati-laptop:~$ export CLASSPATH=$CLASSPATH:/home/vhazrati/bea815/weblogic81/server/lib/weblogic.jar:/home/vhazrati/xebiaprojects/jmsconsole/trunk/target/javax.jms-1.1.jar

For tcsh or csh:
set CLASSPATH = ($CLASSPATH /home/vhazrati/bea815/weblogic81/server/lib/weblogic.jar)

To test

vhazrati@vhazrati-laptop:~$ echo $CLASSPATH

Alternatively you can add the following to your .bashrc

export CLASSPATH=.:/home/vhazrati/bea815/weblogic81/server/lib/weblogic.jar:

2 Responses to “QuickTip: Setting CLASSPATH on linux”

  1. rakeshKRISHNA Says:

    But i can’t get the result

  2. rakeshKRISHNA Says:

    I set my classpath as ur note .But there is some error in running my program as
    java.lang.ClassNotFoundException: com/mysql/jdbc/Driver
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:186)
    at Insert.main(Insert.java:14)

    Any body help me

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>