Java Example Step 2: Opening a Connection to the Rules Engine

Previous Next

The generic syntax of the connection string is:


Here is an example code fragment that shows how to connect to a Rules Engine for the TRAVEL application:

String myconnection = "jdbc:jrec:TRAVEL@localhost:7777";

String user = "SomeUser";

String password = "SomePassword";

Connection c = null;




   c = DriverManager.getConnection(myconnection, user, password);



   catch (SQLException e)


   System.err.println("Can't establish connection" + e);