HOW TO

Use Visual JavaBeans with the ArcGIS ® 10.3.1 Engine Developer Kit (Linux ®) and the Oracle Java 7 Software Developer Kit

Last Published: April 25, 2020

Summary

With the deprecation of the Java Motif Tookit (or 'MToolkit') environment by Oracle at the release of Java 7, applications using Visual JavaBeans in the ArcObjects 10.3.1 SDK for Java cannot be supported on Linux.

This article provides a workaround that allows developers to point to the Java 'Xtoolkit' environment instead, and thereby successfully build and run Visual JavaBeans-based applications using Java 7 SDK.

Procedure

The following is the programming model to build 10.3.1 ArcObjects SDK for Java Linux Visual JavaBeans applications with Oracle Java 7 SDK.
  1. Add the following import statement to the program:
    Code:
    import java.util.Properties;
  2. Immediately after initializing the application for Visual JavaBeans, add the following code to explicitly set the the awt.toolkit property to point to the XToolkit environment in the Java 7 application:
    Code:
    EngineInitializer.initializeVisualBeans();
    Properties prop = System.getProperties();
    prop.setProperty("awt.toolkit", "sun.awt.X11.XToolkit");
    System.loadLibrary("jawt");
  3. The Visual JavaBeans application can now run on Linux with Java 7.
    Note:
    To use the Visual JavaBeans samples provided with the ArcObjects 10.3.1 SDK for Java using the Oracle Java 7 SDK, edit the source files as outlined above, recompile and run.

Article ID:000012448

Software:
  • ArcObjects SDK for the Java Platform

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic