English

FAQ: How do I enable TLS 1.2 for ArcGIS Engine Java Interops?

Question

How do I enable TLS 1.2 for ArcGIS Engine Java Interops?

Answer

ArcGIS Engine provides Java interops to allow developers to create Java applications that utilize the Engine’s underlying GIS processing capabilities. Whether or not any action is necessary depends on the version of Java in use.

Note:
See the Product Life Cycle pages on the Esri Support site for the support status of each released version of ArcGIS Engine.

ArcGIS Engine versions 10.4 – 10.7: 
These versions ship with Java 8 and are ready to go – no action is necessary to use TLS 1.2 with your Java 8 Engine applications.

ArcGIS Engine versions 10.2.1 – 10.3.1: 
These versions ship with Java 7 must have TLS 1.2 enabled if your Java application accesses TLS 1.2 services directly. 
If you continue to run one of these older versions of ArcGIS Engine using Java 7, there are two options:

  • OPTION 1 (Recommended) – Upgrade to a later version of ArcGIS Engine that supports Java 8.
  • OPTION 2 Enable access to TLS 1.2 in your Java 7 application, as follows:

Java 7 does not come with TLS 1.2 security enabled by default, but there is a way to enable it. ArcGIS Engine applications running on Java 7 can take advantage of TLS 1.2 security by adding the following lines of code to the application’s start-up phase (before trying to connect to secure services):

try {
              SSLContext ctx = SSLContext.getInstance("TLSv1.2");
              ctx.init(null, null, null);
              SSLContext.setDefault(ctx);
       } catch (Exception e) {
             System.out.println(e.getMessage());
       }

While enabling TLS 1.2 in ArcGIS Engine applications running on Java 7 should not cause any problems, it may not always be necessary. For example, applications that connect to secure services through a map document (.mxd) and visualized using the MapBean component should work, as Java connection protocols are not used in this scenario.

Related Information