-
Notifications
You must be signed in to change notification settings - Fork 72
Running the Examples
Kim Coleman edited this page Mar 10, 2015
·
8 revisions
The Java Client API source includes several packages containing examples under com.marklogic.client.example. The examples drawn on scripts and other resources in src/main/resources/
.
Use these instructions to run the examples when working with Java Client API sources in the Eclipse IDE.
- Follow the instructions on the wiki for setting up a Java Client API project in Eclipse.
- Modify your copy of
src/main/resources/Example.properties
to match your MarkLogic connection information, as described in src/main/resources/example/README.txt. - To run an example, right-click on it in the Package Explorer and select Run As...Java Application.
Note that some of the Cookbook examples (com.marklogic.client.example.cookbook) depend on one another, so the order in which you run them matters. For example,
DocumentRead.java
assumes DocumentWrite.java has already run. SeeAllCookbookExamples.java
for a safe ordering.
Use these instructions to run the examples when working with a pre-built Java Client API library, such as the ZIP file available from developer.marklogic.com. The examples are included in the pre-built JAR.
- Download and unzip the Java Client API library package to a location of your choice.
- Ensure that you have a compatible Java JRE on your path.
- Modify java-client-api-version/example/Example.properties to match your MarkLogic connection information, as described in java-client-api-version/example/README.txt.
- Run one of the examples listed in the README by...