Linux Headquarters

I've installed Linux… now what???

Setting your Classpath

The CLASSPATH in a UNIX-based system is an environment variable that is a list of directories that the operating system looks in to find library classes and modules. For example, to compile Java, the Java *.class files must be in your CLASSPATH.

Setting your Classpath
The syntax for setting your classpath is slightly dependent on which shell you are using. The default shell for RedHat 5.x and 6.x is the bash shell. Two other popular shells are tcsh and and csh called “t shell” and “c shell.” Thus, these 3 shells are covered here. If you are using a different shell, you can read the man pages by typing man “shellname” to find out the exact syntax. To find out which shell you are running, type the command finger yourusername such as finger tfox and look at the argument for Shell.

For bash shell:
export CLASSPATH=$CLASSPATH:/java/classes:/home/tchin/myclasses

For tcsh or csh:
set CLASSPATH = ($CLASSPATH /java/classes /home/tchin/myclasses)

These commands can either be typed at the terminal each time you login, or you can add it to your .bashrc for bash shell or .cshrc for csh or tcsh so that each time you login, the CLASSPATH is already set. The $CLASSPATH means to keep the existing CLASSPATH and then append it with the other directories listed. This is helpful if a directory is set in the CLASSPATH by the System Administrator for everyone.

What is Related

Comments are closed.

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube
Free UK Domain Names
Inside iOS Apps TechWench

Technology blog
Cloud Storage Providers List

Linux top news 2012

Linux is known as one of the basic software used ...

Dedicated Linux Serv

Linux is the popular system nowadays, offering all the benefits ...

StarOffice 5.1

Introduction StarOffice 5.1 is a complete office suite with a word ...


Introduction AxY FTP, formerly known as wxFTP, is a graphical FTP ...

Adobe Acrobat PDF Re

Introduction Many of you are probably familar with Adobe Acrobat Reader ...

Twitter updates

No public Twitter messages.