/ Forside / Teknologi / Udvikling / Java / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java
#NavnPoint
molokyle 3688
Klaudi 855
strarup 740
Forvirret 660
gøgeungen 500
Teil 373
Stouenberg 360
vnc 360
pmbruun 341
10  mccracken 320
Eclipse And JDBC Driver settings
Fra : gachsaran


Dato : 03-05-07 00:18

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

 
 
Arne Vajhøj (03-05-2007)
Kommentar
Fra : Arne Vajhøj


Dato : 03-05-07 00:52

gachsaran wrote:
> 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

David Harper (03-05-2007)
Kommentar
Fra : David Harper


Dato : 03-05-07 05:57

gachsaran wrote:
> 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

Søg
Reklame
Statistik
Spørgsmål : 177564
Tips : 31968
Nyheder : 719565
Indlæg : 6408970
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste