Where is the MySQL JDBC jar file in Ubuntu?

后端 未结 3 514
我在风中等你
我在风中等你 2021-01-31 07:40

I have installed MySQL 5.5.32 via apt-get install into Ubuntu 13.04.I want to use it in a Java project.For this i must have MySql connector jar.I can not find it.I

相关标签:
3条回答
  • 2021-01-31 08:29

    First, apt-get install libmysql-java

    Then mysql.jar is located in /usr/share/java/mysql.jar.

    Third, in Eclipse, do this as: Project -> Properties -> Java Build Path -> Libraries -> Add External JARs -> select /usr/share/java/mysql.jar

    0 讨论(0)
  • 2021-01-31 08:34

    If you're using a version of Ubuntu prior to 19.04, you'll need to install libmysql-java, the MySQL JDBC driver, because the connector is not in the Ubuntu-packaged MySQL package that you've already installed. Versions after that do not publish that package.

    Once it's installed, you'll have the file /usr/share/java/mysql.jar, which is an indirect symlink to the actual jar file.

    Alternatively, install the mysql-apt-config package, update, and you'll be able to install all currently supported MySQL software with apt.

    0 讨论(0)
  • 2021-01-31 08:34

    In ubuntu 19.10 the following works:

    apt-get install libmariadb-java
    
    0 讨论(0)
提交回复
热议问题