-
Powers, Peter M. authoredPowers, Peter M. authored
Developer Basics
The following provides basic guidance on how to set up command-line use of nshmp-haz.
Required Software
- Java 11 JDK: Oracle or Amazon Corretto
-
Git
- Git is a distributed version control system. The USGS uses a GitLab instance to host projects and facilitate sharing and collaborative development of code.
- On macOS, Git is included in the developer tools.
- On Windows, users may want to consider Git for Windows or GitHub Desktop, both of which include a linux-like terminal (Git BASH) in which subsequent commands listed here will work.
Other project dependencies are managed with Gradle, which does not
require a separate installation. Gradle is clever about finding Java, but some users may have to
explicitly define a JAVA_HOME
environment variable. For example, on Unix-like systems with
bash
as the default shell, one might add the following to ~/.bash_profile
:
# macOS
export JAVA_HOME="$(/usr/libexec/java_home -v 11)"
# Linux
export JAVA_HOME=/usr/lib/jvm/jdk-11.0.6.jdk
On Windows systems, environment variables are set through the System Properties > Advanced > Environment Variables...
control panel. Depending on where Java is installed, JAVA_HOME
might be:
JAVA_HOME C:\Program Files\Java\jdk-11.0.6.jdk
Set Up Git
Follow the GitLab instructions. Some users may find it easier to use Git for Windows or GitHub Desktop. These desktop applications install required system components and are helpful for managing communication between local and remote repositories and viewing file diffs as one makes changes.
Get the Code
cd /directory/for/code
git clone https://code.usgs.gov/ghsc/nshmp/nshmp-haz.git
Related Pages
-
Building & Running
- Developer Basics
- Calculation Configuration
- Site Specification
- Using Docker
- See also the examples directory
- Documentation Index
U.S. Geological Survey
National Seismic Hazard Mapping Project (NSHMP)