Running from a Command Line

NOTE: the information on this page pertains to AllegroGraph version 3.x. There is no corresponding 4.x page at this time.

Below are instructions for running examples from the command line on various platforms.

Please note that the Learning Center examples are not intended to be treated as command line utilities; rather, they are best understood by first reading through the source code to learn what the example does, and then running it to see the output. Java developers may prefer an IDE such as Eclipse for this purpose.

The instructions assume that the examples have already been built (either from a command line or in Eclipse), and that a server is running.

Open a shell (command prompt) and cd to the directory where the examples jar file was unpacked. You can confirm that you have the example .class files and try a few examples as shown below. You may find it helpful to proceed through the examples in the order provided in the Learning Center index.

On Mac OS X and other Unix Platforms


$ pwd
/tmp/agexamples
$ ls
bin  data  lib  src  ts
$ java -cp bin:"lib/*" com/franz/agbase/examples/AGConnecting
Attempting to connect to the server on port 4567
Connection enabled.
Disconnecting from the server.
Done.
$ java -cp bin:"lib/*" com/franz/agbase/examples/AGKennedy
Loading N-Triples /tmp/agexamples/data/kennedy.ntriples
Loaded 1214 triples.

On Windows


C:\tmp\agexamples>dir /b
.classpath
.project
bin
data
lib
src
ts
C:\tmp\agexamples>java -cp bin;lib\* com/franz/agbase/examples/AGConnecting
Attempting to connect to the default server.
Connected to the server on port 4567
Disconnecting from the server.
Done.
C:\tmp\agexamples>java -cp bin;lib\* com/franz/agbase/examples/AGKennedy
Loading N-Triples C:\tmp\agexamples\data\kennedy.ntriples
Loaded 1214 triples.

Up | Next

Copyright © 2023 Franz Inc., All Rights Reserved | Privacy Statement Twitter