How to use Oracle JDBC driver in Gradle project

前端 未结 7 1218
醉话见心
醉话见心 2020-12-15 19:09

I\'m new with Gradle projects and I have one question. I\'ve searched in Internet but I couldn\'t find what I need or maybe I couldn\'t know how to search it. First I\'m goi

7条回答
  •  [愿得一人]
    2020-12-15 19:36

    In addition to correct answer, I want to share my experience how I solve a problem with ojdbs dependence (used gradle and Intellij Idea).

    1. Go to the oracle site and download jdbs file(s). I chose to download the full archive - ojdbc8-full.tar.gz
    2. Unpack the archive in someone directory (for example c:\folder\OJDBC8-Full)
    3. In Intellij Idea go to the Project Structure/Libraries, press "+" symbol and specify a path to the folder there archive unpacked (OJDBC8-Full). Specify name:

    1. In build.gradle add:

    dependencies {

    ...

    compile files('libs/OJDBC8-Full') //OJDBC8-Full - it is name what you specify for librare

    ...

    }

提交回复
热议问题