This project includes a set of samples demonstrating how to accomplish various mapping and GIS tasks with the ArcGIS Runtime SDK for Java.
These samples are built with Gradle. If you want to learn more about Gradle, learn more from [Gradle's guide] (https://docs.gradle.org/current/userguide/userguide.html). The samples project has a Gradle multi-project structure.
This guide has instructions for running samples using the command line or with the Eclipse and IntelliJ IDEA IDEs.
For developers new to Git, please see the wiki page for how to clone this repository.
To run the samples in a terminal, cd
into the project and call the gradle run task for the sample:
On Linux/Mac
$ ./gradlew :display-information:show-callout:run
On Windows
> gradlew.bat :display-information:show-callout:run
There is no need to install Gradle to run the samples.
We will step through how to import the Samples project into Eclipse and IntelliJ IDEA. In both IDEs you can choose to import all the samples, just a category of samples, or a single sample.
After cloning the samples, open IntelliJ IDEA and follow these steps:
- Click Import Projects from the Welcome Screen or select File > New > Project from Existing Sources.
- In the select path dialog, select the root
build.gradle
file in thearcgis-runtime-samples-java
directory. If you only want to import a category of samples, select thebuild.gradle
file in that category directory. To import just one sample, select thebuild.gradle
file from the sample's directory. Click OK after specifying thebuild.gradle
file. - Click OK at the next dialog to complete the import.
To view all of the gradle tasks including the Run task, go to View > Tool Windows > Gradle. Select the Run task in the sample's task list to run the sample.
Alternatively, you can open the sample's main class, right-click, and select Run from the dropdown menu.
To import the samples with Eclipse's default gradle plugin, follow these steps:
- Open Eclipse and select File > Import.
- In the import wizard, choose Gradle > Gradle Project, then click Next.
- Select the
arcgis-runtime-samples-java
directory as the project root directory. If you choose a category or sample directory as the root, only those samples will be imported. - Click finish to complete the import.
By default, Eclipse shows each sub-project as a separate project in the workspace. If you want to see the samples in a nested folder view, follow these steps:
- Open the Project Explorer view by selected Window > Show view > Project Explorer.
- Click the down-arrow in the top-right corner of the Project Explorer window OR press Ctrl + F10 with the Project Explorer window selected.
- In the dropdown menu that appears, select Projects Presentation > Hierarchical. Eclipse should now show the samples as a single, nested project. You may need to restart Eclipse for the change to occur.
###Other IDEs### Other IDEs may support Gradle too. Please consult their documentation for importing Gradle projects.
##Resources##
##Contributing## Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing] (https://github.com/esri/contributing).
Find a bug or want a new feature? Please let us know by submitting an issue.
##Licensing## Copyright 2016 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's license.txt file.