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


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.


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:
    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:
    Properties prop = System.getProperties();
    prop.setProperty("awt.toolkit", "sun.awt.X11.XToolkit");
  3. The Visual JavaBeans application can now run on Linux with Java 7.
    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.