Hide console output for a MapObjects - Java application/applet

Last Published: April 25, 2020


By default, when a MapObjects - Java application or applet initializes and interacts with data, informational messages are returned in the Java console associated with the executing application. For example, when an ArcIMS layer is added to a Map bean, the ArcXML request for feature data or a map image is returned in the Java console window. Depending on the type and volume of interaction, the size of the message content may be substantial and may contain compromising information. As a result, developers may choose to eliminate or more closely control the message output to limit console usage and information dispersal.


The following example provides a technique to eliminate message console output. Essentially, it adds an anonymous class to a functional MapObjects - Java application or applet. Use the following steps to implement this technique with your application:

  1. Open the class file that contains the main method for the application or init method for the applet. Add the following code snippet to the main or init method before the Map bean is instantiated:

    System.setOut(new {
    public void write(int b) throws {

    This new class overrides the write method for the output stream of character data to the console window. The write method is empty, thus the content of the output stream is not written to the console.

  2. Compile your main Application class, then execute your application. Note that messages are no longer visible in the console window.

Article ID:000005513

  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options