江户川乱折腾
(1)建立build.gradle文件(2)内容如下:apply plugin: 'Java'repositories {mavenCentral()}dependencies {compile "javax.servlet:javax.servlet-api:3.1-b07","org.slf4j:slf4j-log4j12:1.7.5","org.slf4j:slf4j-jdk14:1.7.5","MySQL:mysql-connector-java:5.1.24" }task copyJars(type: Copy) {from configurations.runtimeinto 'lib' // 目标位置}(3)命令行运行:gradle copyJars(4)lib目录下就是你需要的jar包,gradle自动会分析jar其中依赖关系一并下载