Archives of the TeradataForum
Message Posted: Mon, 31 Jan 2005 @ 00:12:59 GMT
Implicit in this reply is that it is better to retain what the classpath has previously been set to.
That is do this:
CLASSPATH=/foo/bar:$CLASSPATH #for unix
CLASSPATH=c:\foo\bar;%CLASSPATH% # for windows
In doing the later, you lose any previous settings including any classpath settings required to find *your* classes.
P.S. In response to the other part of your question - the driver is determined by the name of a class that resides within the .jar file.
For example the name of the Teradata driver is com.ncr.teradata.TeraDriver. The Oracle one might be named oracle.jdbc.driver.OracleDriver. Basically the java run time searches the directories and archives (.jar files) nominated on the classpath looking for a class named com.ncr.teradata.TeraDriver, oracle.jdbc.driver.OracleDriver or whatever you specified.
In simple terms, the names of the files listed in the classpath is somewhat irrelevant (so long as they exist). Theoretically they could be renamed if you encountered a conflict. On the other hand, the content of the subdirectories or archives that is important. So it doesn't hurt to have extra in the classpath - although performance might be a concern because the runtime searches the classpath to find classes and if you list too much, then it has to search more to find what it is looking for.
Hope this helps.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|