Tinkerpop 3 offers an API (like JDBC does for RDBMS) and (vendor specific) implementations. An in-memory reference implementation is also available.
So first you need to decide upon the implementation you need. For learning purposes I recommend using the reference implementation (TinkerGraph) first.
Easiest way to start is to use maven. For this, add the following dependency:
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkergraph-gremlin</artifactId>
<version>${tinkergraph.version}</version>
</dependency>
If not using maven, you need to add the following jar-files to your class path (I am not aware of an uber-jar for TinkerGraph):
+- org.apache.tinkerpop:tinkergraph-gremlin:jar:3.0.1-incubating:compile
| \- org.apache.tinkerpop:gremlin-core:jar:3.0.1-incubating:compile
| +- org.apache.tinkerpop:gremlin-shaded:jar:3.0.1-incubating:compile
| +- commons-configuration:commons-configuration:jar:1.10:compile
| | \- commons-lang:commons-lang:jar:2.6:compile
| +- org.yaml:snakeyaml:jar:1.15:compile
| +- org.javatuples:javatuples:jar:1.2:compile
| +- com.carrotsearch:hppc:jar:0.7.1:compile
| +- com.fasterxml.jackson.core:jackson-databind:jar:2.5.3:compile
| | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.5.0:compile
| | \- com.fasterxml.jackson.core:jackson-core:jar:2.5.3:compile
| +- com.jcabi:jcabi-manifests:jar:1.1:compile
| | \- com.jcabi:jcabi-log:jar:0.14:compile
| +- org.slf4j:slf4j-log4j12:jar:1.7.12:compile
| | +- org.slf4j:slf4j-api:jar:1.7.12:compile
| | \- log4j:log4j:jar:1.2.17:compile
| \- org.slf4j:jcl-over-slf4j:jar:1.7.12:compile
Now you can use the API from within your Java (or other JVM base) language.
Graph g = TinkerGraph.open(); // open in-memory Graph
Note: Tinkerpop3 needs Java 8 (it offers a very nice API based on Java 8 streams and lambdas!).