General Arc/Java Advice


  1. Try to save addins in the default addin directory of m:\ArcGIS\AddIns\Desktop10.4\.
  2. If you get "This component has no GUI elements" or similar when adding an addin, delete any spaces from the addin name, and if there are spaces in the directory structure, move the addin to a directory structure without them.
  3. If you are asked where to store your profile, choose "Local" rather than "Roaming". This will ensure that the default directory for AddIns is m:\Application Data\ArcGIS\AddIns\Desktop10.4\
  4. If you've deleted m:\Application Data\ArcGIS\AddIns\Desktop10.4\ just make it again. If Arc still doesn't pick up AddIns, then try adding this directory in Arc's AddIn Manager, on the Options tab.
  5. The name of Models is not what shows in ArcToolbox - this is the label. To find the name (which you need for programmatically running a Model), edit the Model, and look in File > Preferences.
  6. If you make a tool for GeoProcessing, make sure there isn't a Toolbox of the same name - Arc appears to will try and run the Toolbox in preference.
  7. If a GUI element that can be set up by Customisation mode is missing (e.g. a toolbar button), a small red warning icon will appear. Go into Customisation mode and drag the warning icon off, then drag the correct GUI element back on.
  8. Arc doesn't like two Addins to contain classes with the same package+classname combinations. It will only display one of them. It also often doesn't like addins with two buttons inside them unless they are on a toolbar. Delete the addin you aren't using.
  9. When in doubt, if nothing else works, shut Arc, and try these things. Start with the first three, then try those in combination with the others:
    1. Delete all the AddIns from the default directory: m:\Application Data\ArcGIS\AddIns\Desktop10.0\.
    2. Delete any AddIns in the PC local default directory: c:\Users\yourid\My Documents[or Documents]\ArcGIS\AddIns\Desktop10.0
    3. In Customise mode, remove the AddIn and re-install it from the file.
    4. Delete any AddIns in the roaming default directory: c:\Users\yourid\AppData\Roaming\ArcGIS\AddIns\Desktop10.0\
    5. Delete any AddIns in the <ArcGIS Install Dir>/java/lib/ext/ directory.
    6. Delete the Default GeoDatabase C:\Documents and Settings\yourid\My Documents\ArcGIS\Default.gdb
    Then re-export the AddIn.
  10. How to turn on the JDK console for System.out.println, and how to enable the exception logging (NB: Needs to write to the registry, so may not work on lab machines).
  11. If Eclipse doesn't recognise a method in another class, and you are sure it is there, make sure you have saved the class.
  12. If GUI elements like popup messages won't shut down, see if they are available in Windows TaskManager (avaliable by pushing ALT-CTRL-DEL) on their own to kill off (Select and then End Process). If not, kill Arc at the TaskMaster and try rebooting the machine -- this sometimes helps.
  13. If you find Arc isn't running default methods, make sure you've got the @Override (case sensitive) above them -- it seems to rewrite its own default methods without this.
  14. Make sure any references to network drives (for example in ModelBuilder model "Environment" properties, or file paths) use a drive letter, rather than a network server address.
  15. If you want to use an image for toolbar icons, you are best off creating an "image" directory in the root of the Eclipse project, and saving the images in there as bmp or png files (some dialogs don't recognise jpgs, whatever the documentation suggests). Once you've made the directory, you need to add it to the project by refreshing it in the project tree (right click the project folder for this option). Toolbar icons should be 16x16 pixels. Project icons should be 30(width)x35(height).