Vertica documentation is moving! Use our new documentation site at https://docs.rocketsoftware.com/bundle/vertica_12.0/page/index.html

code-jdbc-connection-properties.md

Properties myProp = new Properties();
myProp.put("user", "ExampleUser");
myProp.put("password", "password123");
myProp.put("LoginTimeout", "35");
Connection conn;
try {
    conn = DriverManager.getConnection(
        "jdbc:vertica://VerticaHost:/ExampleDB", myProp);
} catch (SQLException e) {
    e.printStackTrace();
}