/bin/sh^M: bad interpreter: No such file or directory

Last Published: April 25, 2020

Error Message

The following error displays upon running the startJavaHelp script:

"./startJavaHelp: <install path>/arcgis/java/docs/startJavaHelp: /bin/sh^M: bad interpreter: No such file or directory".


The UNIX shell script 'startJavaHelp' is in a DOS format, and the file contains ^M line returns.

Solution or Workaround

Run the 'dos2unix' utility on the script file to remove the ^M line returns and format the file for UNIX.

  1. cd to <install path>/arcgis/java/docs/startJavaHelp
  2. Determine the owner <username:group> who installed the ArcGIS Engine Developer Kit and make a note of it:
    ls -l
  3. Log in as root:
  4. Run the 'dos2unix' utility:
    dos2unix startJavaHelp startJavaHelp
  5. Change the owner of the 'startJavaHelp' script from 'root' back to the user who installed the ArcGIS Engine Developer Kit (as determined in step 2). For example, if the <username:group> is <test:users>, then execute:
    chown test:users startJavaHelp
  6. Change the file permissions to 555:
    chmod 555 startJavaHelp
  7. Exit root and run the script as normal.

Article ID:000010400

  • ArcGIS Engine 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic