15720: Warn about empty ManagementToken or SystemRootToken.
[arvados.git] / doc / sdk / java / index.html.textile.liquid
index f39d9c503ed71fb7b449d59b650a2b9899df3ce3..111c0631d0592b1f9a0c62e3bfd899fdb1186dc4 100644 (file)
@@ -1,20 +1,24 @@
 ---
 layout: default
 navsection: sdk
-navmenu: Java
-title: "Java SDK"
-
+navmenu: Java SDK v1
+title: "Installation"
 ...
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
 
-The Java SDK provides a generic set of wrappers so you can make API calls in java.
+The Java SDK v1 provides a low level API to call Arvados from Java.
 
 h3. Introdution
 
 * The Java SDK requires Java 6 or later
-  
+
 * The Java SDK is implemented as a maven project. Hence, you would need a working
 maven environment to be able to build the source code. If you do not have maven setup,
-you may find the "Maven in 5 Minutes":http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html link useful. 
+you may find the "Maven in 5 Minutes":http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html link useful.
 
 * In this document $ARVADOS_HOME is used to refer to the directory where
 arvados code is cloned in your system. For ex: $ARVADOS_HOME = $HOME/arvados
@@ -38,7 +42,7 @@ ARVADOS_API_HOST_INSECURE: Set this to true if you are using self-signed
 </notextile>
 
 * Please see "api-tokens":{{site.baseurl}}/user/reference/api-tokens.html for full details.
-         
+
 
 h3. Building the Arvados SDK
 
@@ -54,34 +58,39 @@ $ <code class="userinput">mvn -Dmaven.test.skip=true clean package</code>
 
 h3. Implementing your code to use SDK
 
-<code class="userinput">$ARVADOS_HOME/sdk/java/ArvadosSDKJavaExample.java</code> serves as a sample
-implementation using the SDK.
+* The following two sample programs serve as sample implementations using the SDK.
+<code class="userinput">$ARVADOS_HOME/sdk/java/ArvadosSDKJavaExample.java</code> is a simple program
+        that makes a few calls to API server.
+<code class="userinput">$ARVADOS_HOME/sdk/java/ArvadosSDKJavaExampleWithPrompt.java</code> can be
+        used to make calls to API server interactively.
 
-Please use this file to see how you would want use the SDK from your java program.
+Please use these implementations to see how you would use the SDK from your java program.
 
 Also, refer to <code class="userinput">$ARVADOS_HOME/arvados/sdk/java/src/test/java/org/arvados/sdk/java/ArvadosTest.java</code>
 for more sample API invocation examples.
 
-Below are the steps to compile and run this java program.
+Below are the steps to compile and run these java program.
 
-* <code class="userinput">ArvadosSDKJavaExample.java</code> creates an instance of Arvados SDK class and uses it to
+* These programs create an instance of Arvados SDK class and use it to
 make various <code class="userinput">call</code> requests.
 
-* To compile ArvadosSDKJavaExample.java
+* To compile the examples
 <notextile>
 <pre>
-$ <code class="userinput">javac -cp $ARVADOS_HOME/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar \
-ArvadosSDKJavaExample.java</code>
-This results in the generation of the ArvadosSDKJavaExample.class file
-in the same directory as the java file
+$ <code class="userinput">javac -cp $ARVADOS_HOME/sdk/java/target/arvados-sdk-1.1-jar-with-dependencies.jar \
+ArvadosSDKJavaExample*.java</code>
+This results in the generation of the ArvadosSDKJavaExample*.class files
+in the same directory as the java files
 </pre>
 </notextile>
 
-* To run the sample
+* To run the samples
 <notextile>
 <pre>
-$ <code class="userinput">java -cp .:$ARVADOS_HOME/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar \
+$ <code class="userinput">java -cp .:$ARVADOS_HOME/sdk/java/target/arvados-sdk-1.1-jar-with-dependencies.jar \
 ArvadosSDKJavaExample</code>
+$ <code class="userinput">java -cp .:$ARVADOS_HOME/sdk/java/target/arvados-sdk-1.1-jar-with-dependencies.jar \
+ArvadosSDKJavaExampleWithPrompt</code>
 </pre>
 </notextile>
 
@@ -119,7 +128,7 @@ The local repository is usually located in your home directory at <code class="u
 <pre>
 In Eclipse IDE:
 Window -> Preferences -> Java -> Build Path -> Classpath Variables
-    Click on the "New..." button and add a new 
+    Click on the "New..." button and add a new
     M2_REPO variable and set it to your local Maven repository
 </pre>
 </notextile>