Unable to "add" the Connector/J jar file to by java program
Posted by: Sergi Pujols
Date: April 04, 2005 05:12AM

Hi:

I've developed a little program with GUIs using the Netbeans software, which connects to a database. To run it, I set the classpath the Netbeans (it must use, of course, the .jar file of JDBC).

However, when I build the software (I generate another jar file), my program is unable to execute this sentence:

Class.forName("com.mysql.jdbc.Driver").newInstance();

I'm sure that it happend due to the program doesn't find the JDBC file. I've also tryied to execute my jar file manually using the -classpath or -cp flags af the java command and indicating the complete path to the connector/j jar file, but it doesn't work.

I need help as soon as possible, because the software must be ready before next week. Please, help me.

Thanks for your answers.

Sergi P.

Options: ReplyQuote


Subject
Written By
Posted
Unable to "add" the Connector/J jar file to by java program
April 04, 2005 05:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.