Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- DriverManager.registerDriver((Driver) Class.forName("org.postgresql.Driver").newInstance());
- StringBuilder url = new StringBuilder();
- url.
- append("jdbc:postgresql:").
- append("table");
- Connection connection = DriverManager.getConnection(url.toString(), "postgres", "asdasdasd12");
- return connection;
- } catch (SQLException | InstantiationException | IllegalAccessException | ClassNotFoundException e) {
- e.printStackTrace();
- }
- group 'ua.kiev.makson'
- version '1.0-SNAPSHOT'
- apply plugin: 'java'
- sourceCompatibility = 1.8
- repositories {
- mavenCentral()
- }
- dependencies {
- compile 'log4j:log4j:1.2.17'
- compile 'org.slf4j:slf4j-api:1.7.5'
- compile 'org.slf4j:slf4j-log4j12:1.7.5'
- compile 'postgresql:postgresql:9.1-901-1.jdbc4'
- compile group: 'junit', name: 'junit', version: '4.4'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement