LinuxQuestions.org
Help answer threads with 0 replies.
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 07-26-2004, 06:04 PM   #1
working2hard
LQ Newbie
 
Registered: Jul 2004
Posts: 20

Rep: Reputation: 0
help with my JDBC Driver


I have a java program that runs perfectly fine on my windows box but on linux it's not working


I am getting a UnknownHost exception

I am establishing a connection to my database with the following command

Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://schoolid.net:3306/schoolid_nutrition", "schoolid_","");


also I am not sure if I didn't install the JDBC driver correctly I installed it and added to the $CLASSPATH variable or should that have been the PATH variable?


can someone please help me


Thanks
 
Old 07-27-2004, 08:06 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
You should either put it to your CLASSPATH or run the program with "java -cp /path/to/mysql-driver.jar Foo". Note also that the path separator is colon -- not semicolon -- in Linux.
 
Old 07-27-2004, 10:18 AM   #3
working2hard
LQ Newbie
 
Registered: Jul 2004
Posts: 20

Original Poster
Rep: Reputation: 0
Hello ToniT,
I set the class path before trying to run in and it still does not work

it gives the Unknown Host Exception.

 
  


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
FC4 JDBC Driver Compatibality issue kartheekpn Linux - Software 0 12-01-2005 06:30 AM
Java JDBC driver mickeyboa Fedora 2 07-23-2005 07:53 AM
regarding jdbc driver pranith Linux - Newbie 5 01-27-2005 12:11 PM
oracle jdbc driver for jsdk 1.5 beta? Ikebo Programming 0 10-17-2004 02:13 PM
JDBC and MySQL Driver White R4bbit Debian 2 08-13-2004 04:55 PM

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

All times are GMT -5. The time now is 12:21 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