Connecting to InterSystems Cloud Services with Java
See how to connect to InterSystems Cloud Services from your Java application using the InterSystems JDBC driver.
See how to connect to InterSystems Cloud Services from your Java application using the InterSystems JDBC driver.
To connect to InterSystems Cloud Services, copy the code below and modify it to include your system's information and point to your JDBC driver:
import com.intersystems.jdbc*;
import java.sql.Connection;
public class JDBCConnection{ public static void main (String[] args) throws Exception { String dbUrl = "jdbc:IRIS://127.0.0.1:1972/User"; //replace
String user = "SQLAdmin"; String pass = "deployment-password"; IRISDataSource ds = new IRISDataSource(); ds.setURL(dbUrl); ds.setUser(user); ds.setPassword(pass); Connection dbconnection = ds.getConnection(); System.out.println("Connected to InterSystems IRIS via JDBC."); } }
Having an issue with the learning site? Want to provide feedback on a course? Contact us by emailing online.training@intersystems.com.
Please include all relevant information, including the page or course you are having trouble with, and any necessary screenshots.