Here you can find the source of getConnection()
public static Connection getConnection() throws SQLException
//package com.java2s; //License from project: Open Source License import java.sql.*; public class Main { public static Connection getConnection() throws SQLException { String url;//w w w . j a v a2 s .c o m String address = System.getProperty("de.njsm.stocks.internal.db.databaseAddress"); String port = System.getProperty("de.njsm.stocks.internal.db.databasePort"); String name = System.getProperty("de.njsm.stocks.internal.db.databaseName"); String username = System.getProperty("de.njsm.stocks.internal.db.databaseUsername"); String password = System.getProperty("de.njsm.stocks.internal.db.databasePassword"); url = String.format("jdbc:mariadb://%s:%s/%s", address, port, name); return DriverManager.getConnection(url, username, password); } }