This document tells you how to quickly connect your integrated development environment (IDE) for ObjectScript, Java, .NET, Python, or JavaScript/Node.js to an instance of InterSystems IRIS® and verify that you have successfully connected, using template files downloaded from GitHub.
InterSystems IRIS Connection Information
To connect an IDE to an InterSystems IRIS instance, you first need to select the instance, then determine the needed connection information, as follows:
-
Host identifier: the IP address or hostname of the instance’s host.
-
The superserver port number for the instance.
-
Valid credentials for the instance.
-
The name of an existing namespace on the instance.
It is also helpful to know the URL of the instance’s web-based Management PortalOpens in a new tab, and how to open the InterSystems TerminalOpens in a new tab on the instance, which requires the instance’s name.
How you determine this information depends on how you deployed the instance you are working with, as follows:
InterSystems Kubernetes Operator
Kubernetes deployments can include servicesOpens in a new tab that expose pods and the containers they contain to the network, as needed, through external IP addresses. Regardless of the InterSystems IRIS topology you deploy with the IKO, a service is always created to expose the primary data node—data node 1 in a sharded cluster, the data server in a distributed cache cluster, or a standalone instance. For information about using this service to connect to the superserver port (1972) or web server port (80) of the InterSystems IRIS instance on the primary data node, see Connect to the IrisClusterOpens in a new tab in Using the InterSystems Kubernetes Operator.
The credentials for an IDE connection or the Management Portal are one of the predefined user accounts and the default password you set using the PasswordHashOpens in a new tab parameter in a configuration merge file specified in the configSource field, or an account and password you previously added to the instance.
To open the Terminal for the primary data node instance, use the following command:
kubectl exec -it IrisCluster_name-data-0 iris terminal IRIS
If the deployment is mirrored, use the pod name IrisCluster_name-data-0–0 instead to open the Terminal on the current primary. The instance name is always IRIS in any container from InterSystems. Commands issued from outside an InterSystems IRIS container using docker exec, and thus kubectl exec, are executed inside the container as irisownerOpens in a new tab and do not require authentication, so you do not need to log in to the Terminal.
You can always connect your IDE to the USER namespace that exists on all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems Cloud Manager
For detailed information about accessing the Management Portal for the primary data node in a deployment — data node 1 in a sharded cluster, the data server in a distributed cache cluster, or a standalone instance — see the InterSystems Cloud Manager GuideOpens in a new tab.
The credentials for an IDE connection or the Management Portal are one of the predefined user accounts and the default password you set when deploying services on your infrastructure with the icm run command, or an account and password you have previously added to the instance.
To open the Terminal for an instance deployed by ICM, you can use the icm session command with the -interactive option and the -machine option specifying the node hosting the instance; no authentication is required.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but if you used the Namespace property in the definitions.jsonOpens in a new tab file or the -namespace option when deploying to specify a different default execution namespace, you may want to connect to that instead. You can also connect to a different namespace you previously created using the Management Portal.
InterSystems IRIS Deployed in a Container
As explained in detail in Web Access Using the Web Gateway ContaineOpens in a new tabr in Running InterSystems Products in Containers, the InterSystems IRIS Management Portal is a built-in web application, therefore a web server and the InterSystems Web Gateway are required to load it in your browser. However, a single Web Gateway instance configured to interact with multiple InterSystems IRIS containers cannot direct a request for an application common to all of the instances to a specific instance.
One simple way to enable Management Portal access to a containerized InterSystems IRIS instance is to run a dedicated Web Gateway container (which also contains a web server) with each InterSystems IRIS container. A dedicated Web Gateway container is configured to interact only with the InterSystems IRIS container with which it is paired; for deployments requiring a web server tier, additional Web Gateway containers must be included. For more information about and instructions for running dedicated and web server node Web Gateway containers and other approaches to providing Management Portal access to containerized InterSystems IRIS instances, see Options for Running Web Gateway ContainersOpens in a new tab.
Important:
InterSystems IRIS Community Edition containers are an exception to the above. For information about accessing the Management Portal of a Community Edition instance, see Interact Using the Management PortalOpens in a new tab in Deploy and Explore InterSystems IRIS.
The credentials for an IDE connection or the Management Portal are one of the predefined user accounts and the default password you setOpens in a new tab when creating the container, or an account and password you have previously added to the instance.
To open the Terminal for an instance in a container, you can use the docker exec command to run the iris terminal command within the container, and you can also use docker exec to open a shell within the container and run iris terminal from that; for examples, see Interacting Using the InterSystems Terminal in Deploy and Explore InterSystems IRIS. The instance name is always IRIS in any container from InterSystems. Commands issued from outside an InterSystems IRIS container using docker exec are executed inside the container as irisownerOpens in a new tab and do not require authentication, so you do not need to log in to the Terminal.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems IRIS Installed from a Kit
For an InterSystems IRIS instance installed from a kit, the host identifier is the hostname or IP address of the system the instance is running on; you can use localhost if it is installed locally.
InterSystems IRIS installation sets the superserver port to 1972 by default. However, if you have more than one instance of InterSystems IRIS installed on a system, the superserver port of the instances vary; to display the port numbers for all of the instances, you can use the iris listOpens in a new tab command on the operating system command line.
On all systems, you can use the URL described in Access the Management Portal and Other System ApplicationsOpens in a new tab in the Web Gateway Guide to open the Management Portal. On a Windows system, assuming a correctly configured Web Gateway and web server, you can open the Management Portal by clicking the InterSystems IRIS icon in the system tray and selecting Management Portal.
To open the Terminal for an installed instance:
-
On Windows systems, you can select the Terminal option on the InterSystems IRIS launcher menuOpens in a new tab.
-
On all systems, you can use the iris terminalOpens in a new tab command on the operating system command line, with the instance name as an argument. The instance name is set when you install the instance and cannot be changed; you can use the iris list command to display it.
The credentials for all purposes are one of the predefined user accountsOpens in a new tab and the default password SYS (you are prompted to immediately change the password after logging in to one of these accounts), or an account and password you have previously added to the instance.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems IRIS Community Edition
For information about accessing the Management Portal for a Community Edition instance, which is unlike other types of instances in this regard, see Interact Using the Management PortalOpens in a new tab in Deploy and Explore InterSystems IRIS.
To information about opening the Terminal for any Community Edition instance, see Interacting Using InterSystems Terminal in Deploy and Explore InterSystems IRIS.
The credentials for an IDE connection and the Management Portal are one of the predefined user accountsOpens in a new tab and either the new default password you provided when changing the password on first connecting to the cloud nodeOpens in a new tab or the default password SYS, if you are on your own system or logging in to the cloud instance without having connected to the node first. When you use SYS, you are prompted to immediately change the password for the account you are using. You can also use an account you previously created on the instance.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems Learning Labs
All connections to the containerized InterSystems IRIS instance that is part of your InterSystems Learning Labs configuration are set up during the Learning Labs launch, and all the connection information you need is displayed on the launch page, as follows:
-
The URL for the integrated IDE.
-
A set of credentials for all purposes.
-
The Management Portal URL.
-
The web server port number (always 80).
-
Under External Connections, the server’s IP address and the superserver port number (labeled InterSystems IP and InterSystems Port); you can use these to connect an IDE such as InterSystems Studio or Visual Studio Code with the ObjectScript extension to the instance.
A Terminal option is available on the InterSystems menu in the integrated IDE (as is a Management Portal option), so you don’t need to keep track of the instance name.
Java IDEs
This section provides connection instructions for Visual Studio Code (with the Coding Pack for Java or the Java Extension Pack), Eclipse, IntelliJ, and NetBeans, which you can use to develop Java code that interacts with InterSystems IRIS using the InterSystems Native SDKOpens in a new tab and JDBCOpens in a new tab.
Visual Studio Code
To connect Visual Studio Code to InterSystems IRIS, use the following steps. (Log in to GitHub if necessary.)
-
In your web browser, download or clone https://github.com/intersystems/Samples-java-helloworldOpens in a new tab.
-
In Visual Studio Code, use File > Open Folder to open the folder you recently downloaded or cloned from GitHub.
-
Select and open src/main/java.com.intersystems.samples.helloworld.java.
-
Configure the username, password, IP address, and superserver port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:webserverPort/namespace, for example jdbc:IRIS://12.345.678.910:1972/USER.
-
Use View > Terminal to open the terminal and execute the following commands:
javac -cp ".:intersystems-jdbc-3.2.0.jar" HelloWorld.java
java -cp ".:intersystems-jdbc-3.2.0.jar" HelloWorld
-
The Output pane displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.
Eclipse
To connect Eclipse to InterSystems IRIS, use the following steps. (Click Next to advance to the next panel of each dialog as needed.)
First, import the sample package,
-
Select File > Import > Git > Projects from Git.
-
Choose Clone URI. Copy and paste https://github.com/intersystems/Samples-java-helloworldOpens in a new tab into the URI field.
-
Select the master branch, configure local storage, then choose Import existing Eclipse projects.
-
Confirm the import by clicking Finish.
Next, update the sample code and run it.
-
Open samples-java-helloworld > src > main.java.com.intersystems.samples > HelloWorld.java and make the following changes:
-
Change the package declaration at the top to package main.java.com.intersystems.samples;.
-
Configure the username, password, IP address, and port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:superserverPort/namespace, for example jdbc:IRIS://12.345.678.910:1972/USER.
-
Run the code by selecting Run > Run.
-
The Console tab displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.
If you are not successful, confirm that the Java execution environment is set properly by doing the following:
-
Right-click the samples-java-helloworld project in the Package Explorer pane and choose Build Path > Configure Build Path....
-
On the Libraries tab, choose Add Library > JRE System Library > Execution environment > and choose an execution environment, such as JRE-1.1 (jre 1.8.0_172). Click Finish and then Apply and Close.
IntelliJ
To connect IntelliJ to InterSystems IRIS, use the following steps. (Click Next to advance to the next panel of each dialog as needed.)
First, create the sample project.
-
Select VCS > Checkout from Version Control > Git.
-
On the Clone Repository dialog,
-
Copy and paste https://github.com/intersystems/Samples-java-helloworldOpens in a new tab into the Clone URI field.
-
For the Directory field, enter the path to the location where you want the local GitHub repository created.
-
Click Clone, then choose Yes in the popup to create a project based on this source.
Next, update the sample code and run it.
-
Open src/main/java.com.intersystems.samples.helloworld.java and configure the username, password, IP address, and port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:superserverPort/namespace, for example jdbc:IRIS://12.345.678.910:1972/USER.
-
In the Project pane, right-click HelloWorld.java and choose Run ‘HelloWorld.main()’.
-
The Output pane displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.
If you are not successful, confirm that the Java execution environment is set properly by doing the following:
-
Choose Build Path > Build Project.
-
Edit the configuration and add a new application configuration, selecting com.intersystems.samples.HelloWorld for the main class.
-
If the error Error:java: invalid source release: 9 is displayed, change the project SDK and project language level to 1.8 in the following locations:
-
File > Project Structure > Project Settings
-
File > Project Structure > Module Settings > Sources: Language Level tab
-
File > Project Structure > Module Settings > Dependencies: Module SDK tab
NetBeans
To connect NetBeans to InterSystems IRIS, use the following steps. (Click Next to advance to the next panel of each dialog as needed.)
First, create the sample project.
-
Select Team > Git > Clone.
-
Copy and paste https://github.com/intersystems/Samples-java-helloworldOpens in a new tab into the Repository URL field.
-
Select Master as the branch to be fetched, choose the location where you want the local GitHub repository to be created, and click Finish.
Next, update the sample code and run it.
-
Open HelloWorld.java and configure the username, password, IP address, and port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:superserverPort/namespace, for example jdbc:IRIS://12.345.678.910:1972/USER.
-
In the Project pane, open the Dependencies folder, then right-click intersystems-jdbc-3.0.0.jar and choose Manually install artifact. Navigate to the folder you recently cloned, select intersystems-jdbc-3.0.0.jar, and click Install Locally.
-
In the Project pane, right-click HelloWorld.java and choose Run File.
-
The Output pane displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.