JoView Plus and Tutorial sample applications fail to start

Last Published: April 25, 2020


After installing MapObjects—Java 2.0, the JoView Plus, JoView, and Tutorial sample applications fail to start.


The most likely cause is that the Java Virtual Machine (JVM) being referenced by the application is located in a path directory that contains spaces. For example, if during installation an existing JVM was chosen to be used, it may have been located in C:\Program Files\Java\j2re1.4.1. The space in 'Program Files' would have caused the failure of the batch files used to start the sample applications.

Solution or Workaround

There are a couple of options to resolve this situation.

  1. Reinstall MapObjects—Java and choose to use the default JVM or select an existing JVM in a valid path directory without spaces. For example, C:\Java\j2re1.4.1. The batch files will be able to successfully process that location.
  2. Modify the StartJoview.bat, StartTutorial.bat, and StartJoviewPlus.bat files in a text editor to correctly process the path location. The code for the StartJoviewPlus.bat file is shown below:

    REM Startup script for ESRI MapObjects JoView Plus

    set MOJ20=C:\ESRI\MOJ20

    CALL %MOJ20%\Scripts\MOJ_RUN com.esri.jvp.JoViewPlus jvp.jar
    %MOJ20%\Samples\JoViewPlus C:\Program Files\Java\j2re1.4.1%MOJ20%

    The 'Program Files' path toward the end of the code needs to be changed to the shortened DOS version such as 'Progra~1'. The edited file will look like this:

    REM Startup script for ESRI MapObjects JoView Plus

    set MOJ20=C:\ESRI\MOJ20

    CALL %MOJ20%\Scripts\MOJ_RUN com.esri.jvp.JoViewPlus jvp.jar
    %MOJ20%\Samples\JoViewPlus C:\Progra~1\Java\j2re1.4.1%MOJ20%

    Although this is the most likely scenario, the DOS path version may not be the same on all computers, and a different path location may have been used altogether. To determine the appropriate DOS version of the path, utilize the command prompt. Open a new command prompt window and change to the directory where the path contains a space. So, using the same example, navigate to the C directory since 'Program Files' is located there.

    At the prompt, enter: dir /x. The output will appear as in this image:

    [O-Image] Command Prompt Sample
    The Program Files line has been highlighted in white. Notice the Progra~1 listed in the fifth column. This is the shortened DOS version of the pathname that should be replaced in the batch files as outlined earlier.

Article ID:000006525

  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic