Oracle Thin JDBC Driver Problem - Run time - JDBC JAVA
This is a discussion on Oracle Thin JDBC Driver Problem - Run time - JDBC JAVA ; Hi,
i did the following code:
import java.sql.* ;
import java.lang.*;
class TestCommand {
public static void main(String a[] ) throws SQLException
{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con =
DriverManager.getConnection("jdbc racle:thin:@project:1521 roj","project1",
"admission");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select ...
-
-
Re: Oracle Thin JDBC Driver Problem - Run time
saro_77_vlr wrote:
> Exception in thread "main" java.lang.NoClassDefFoundError: TestCommand
This means that your own class TestCommand cannot be found through
$CLASSPATH (%CLASSPATH%).
Perhaps you forgot to add the current directory to %CLASSPATH%.
You'll have to add the .jar file of the Oracle driver as well.
Daniel
-
Re: Oracle Thin JDBC Driver Problem - Run time
Daniel Dittmar wrote:
>> Exception in thread "main" java.lang.NoClassDefFoundError: TestCommand
>
>This means that your own class TestCommand cannot be found through
>$CLASSPATH (%CLASSPATH%).
>
>Perhaps you forgot to add the current directory to %CLASSPATH%.
>
>You'll have to add the .jar file of the Oracle driver as well.
>
>Daniel
Hi,
I was working along with this person. The classes12.zip i.e. the JDBC driver
file has been successfully appended to the CLASSPATH environment variable but
of no use
--
Shouvik
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...bases/200602/1
-
Re: Oracle Thin JDBC Driver Problem - Run time
Hello,
> Perhaps you forgot to add the current directory to %CLASSPATH%.
>
> You'll have to add the .jar file of the Oracle driver as well.
under NetBeans:
- right mouse click on your project
- select Properties
- select Libraries and add your Oracle Driver
Regards
Michael
--
http://www.smurfi.de
German NetBeans-Site
-
Re: Oracle Thin JDBC Driver Problem - Run time
Kroll, Michael wrote:
>Hello,
>> Perhaps you forgot to add the current directory to %CLASSPATH%.
>>
>> You'll have to add the .jar file of the Oracle driver as well.
>
>under NetBeans:
>
>- right mouse click on your project
>- select Properties
>- select Libraries and add your Oracle Driver
>
>Regards
>Michael
>
Hi
I did this too but to no result always the Exception raised is
ClassNotFoundException pl help
With regards
--
Shouvik
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...bases/200602/1
-
Re: Oracle Thin JDBC Driver Problem - Run time
Shouvik Das via JavaKB.com wrote:
> Daniel Dittmar wrote:
>>> Exception in thread "main" java.lang.NoClassDefFoundError: TestCommand
>> This means that your own class TestCommand cannot be found through
>> $CLASSPATH (%CLASSPATH%).
>>
>> Perhaps you forgot to add the current directory to %CLASSPATH%.
>>
>> You'll have to add the .jar file of the Oracle driver as well.
>>
>> Daniel
>
> Hi,
> I was working along with this person. The classes12.zip i.e. the JDBC driver
> file has been successfully appended to the CLASSPATH environment variable but
> of no use
>
Are you trying to run your code inside of NetBeans or from the command line?
If it is the latter (c:\> java TestCommand), you have to add the
directory containing TestCommand.class to CLASSPATH, (assuming that
TestCommand.java contains no packagage statement).
Java does *not* search the current directory for class files unless your
CLASSPATH contains it.
Daniel
-
-
Re: Oracle Thin JDBC Driver Problem - Run time
hi,
it is not working.....
plz help.............
--
Saravanan M
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...bases/200602/1
-
Re: Oracle Thin JDBC Driver Problem - Run time
On Thu, 16 Feb 2006 11:25:28 +0000, Shouvik Das via JavaKB.com wrote:
> Hi,
> I was working along with this person. The classes12.zip i.e. the JDBC driver
> file has been successfully appended to the CLASSPATH environment variable but
> of no use
Silly question, and no insult intended: do you alter the CLASSPATH for
the environment? That is, inside the IDE?
Or - as I have seen some do - with the environment up, set the CLASSPATH
in the environment variables, without restarting the IDE.
Similar Threads
-
By Application Development in forum Java
Replies: 0
Last Post: 10-09-2007, 03:21 PM
-
By Application Development in forum JDBC JAVA
Replies: 0
Last Post: 10-09-2007, 01:15 PM
-
By Application Development in forum JDBC JAVA
Replies: 2
Last Post: 04-14-2005, 07:49 PM
-
By Application Development in forum JDBC JAVA
Replies: 2
Last Post: 04-04-2005, 10:34 AM
-
By Application Development in forum Java
Replies: 1
Last Post: 03-28-2005, 12:30 AM