LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-18-2005, 05:55 AM   #1
Rodotheos
LQ Newbie
 
Registered: Apr 2005
Location: Greece
Distribution: openSuSE 10.3
Posts: 25

Rep: Reputation: 15
How to set the CLASSPATH environment variable


Hi guys,

I have recently downloaded the MySQL Connector/J the jdbc driver to connect to a MySQL database. Reading the installation instructions I found that under UNIX systems and using csh I have to run the following command: $ setenv CLASSPATH /path/to/mysql-connector-java-[version]-bin.jar:$CLASSPATH

I executed just the setenv command to find that there isn't any CLASSPATH variable there yet.
My question is... shall I run the comand as it is in the instructions manual to set the CLASSPATH or there is the danger to change something that alert the way my java apps execute?

What shall I do to install the driver? Any suggestions more than welcome.
Thanks in advance,
Rodotheos.
 
Old 06-18-2005, 07:37 AM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
`setenv' is for csh. Use
Code:
$ export CLASSPATH=/path/to/foo:$CLASSPATH
in Bourne shells (sh, bash,).

You may want to do that in your .bashrc too.

hth --Jonas
 
Old 06-20-2005, 04:00 AM   #3
Rodotheos
LQ Newbie
 
Registered: Apr 2005
Location: Greece
Distribution: openSuSE 10.3
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks Jonas,

I'll try it. Bythe way, what is .bashrc?
 
Old 06-20-2005, 04:30 AM   #4
grimse
Member
 
Registered: Oct 2004
Location: Oldenburg, Germany
Distribution: FC4
Posts: 42

Rep: Reputation: 15
hi
the ~/.bashrc allows you to set custom setting for your bash. you can add e.g. pathes, alias, scripts.

greetings, grim
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set environment variable pranith Linux - Newbie 1 01-27-2005 11:23 PM
How to set a value of environment variable? ukrainet Linux - Newbie 1 12-28-2004 04:33 AM
How to set PATH and CLASSPATH environment variables bronko Linux - Newbie 2 12-20-2003 11:13 AM
How to set a environment variable in rh? yenonn Linux - Newbie 11 02-21-2003 10:24 PM
how to set CC environment variable mr.moto General 2 12-18-2001 01:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration