Navigate to this sample's lib folder (findlocations/lib) and copy FindLocationsExt.jar into the <ArcGIS Desktop Install Dir>/java/lib/ext folder to deploy the custom extension.
Open ArcCatalog and expand Toolboxes.
Create a new toolbox under My Toolboxes providing a logical name: CustomGPFindLocations.
Right-click CustomGPFindLocations, hover the mouse over Add, and click Tool. A dialog box opens.
Expand FLFunctionFactory from the list of toolboxes, select FindLocations tool and click OK.
To run this custom tool you must have the scratch workspace set to a valid folder. Ensure that you have a scratch workspace set.
In ArcCatalog, double-click the custom tool and provide values for all the parameters.