| View previous topic :: View next topic |
| Author |
Message |
gachsaran Guest
|
Posted: Thu May 03, 2007 4:17 am Post subject: Eclipse And JDBC Driver settings |
|
|
I use linux and Eclipse IDE to develop a JDBC based application. But
Eclipse can not see mysql-connector. If i use a editor like Gedit i can
compile and run the application.Mysql-connetor is in my CLASSPATH but
Eclipse does not see it. It means every times i create a java project
that use Jdbc i need to include muysql-connectorXXX.jar into java project.
Any help will be appriciated.
Tanks
gachsaran |
|
| Back to top |
|
 |
Arne Vajhøj Guest
|
Posted: Thu May 03, 2007 4:51 am Post subject: Re: Eclipse And JDBC Driver settings |
|
|
gachsaran wrote:
| Quote: | I use linux and Eclipse IDE to develop a JDBC based application. But
Eclipse can not see mysql-connector. If i use a editor like Gedit i can
compile and run the application.Mysql-connetor is in my CLASSPATH but
Eclipse does not see it. It means every times i create a java project
that use Jdbc i need to include muysql-connectorXXX.jar into java project.
|
I would say that it is a good thing that you explicit has to put
a specific version of a specific library in your classpath for
a project.
And the 10 second overhead for a project you will work on
for N must must be tolerable.
If you really want to make your environment obfuscated, then
dump the jar file in jre/lib/ext, but do not say that you were
not warned against it.
Arne |
|
| Back to top |
|
 |
David Harper Guest
|
Posted: Thu May 03, 2007 7:10 am Post subject: Re: Eclipse And JDBC Driver settings |
|
|
gachsaran wrote:
| Quote: | I use linux and Eclipse IDE to develop a JDBC based application. But
Eclipse can not see mysql-connector. If i use a editor like Gedit i can
compile and run the application.Mysql-connetor is in my CLASSPATH but
Eclipse does not see it. It means every times i create a java project
that use Jdbc i need to include muysql-connectorXXX.jar into java project.
Any help will be appriciated.
|
You must first import the Connector/J JAR file into your Eclipse
project, then include it in the build path using the "Configure Build
Path..." dialog.
Once you have done this, Eclipse will include it in the classpath when
compiling and running your code.
Use the Eclipse help system and search for "build path" to get more
information.
David Harper
Cambridge, England |
|
| Back to top |
|
 |
|