Compiling and running a sample LLA program
About this task
The examples in this procedure are given for Windows command prompt.
Procedure
1 Set the paths.
set PATH=<path to your ssolidacxx DLL>;%PATH%
Make sure that you have the directory containing solidDB ® communication libraries in your path too.
2 Set your path environment variable to include JDK HOTSPOT runtime environment in (SJA has only been tested in hotspot JRE).
For example:
set PATH=<your JDK directory>\jre\bin\hotspot;%PATH%
3 Compile the sample SJASample.java file (located in the samples/aclib_java directory) with the following command:
javac -classpath <solidDB® JDBC driver directory>/ SolidDriver2.0.jar;. \ SJASample.java
4 Run the sample application with a command line resembling the next one:
java -Djava.library.path=<path to ssolidacxx DLL> \ -classpath
<solidDB® JDBC driver directory>/SolidDriver2.0.jar;. \ SJAsample
For example, if you installed the server to C:\soliddb and would like to run the SJASample program, then your command line would look like:
java -Djava.library.path=C:\soliddb\bin
-classpath C:\soliddb\jdbc\SolidDriver2.0.jar;. SJASample
On Windows, the ssolidacxx.dll dynamic library is in the bin subdirectory of the solidDB® root installation directory.
As in the example class SJASample, you must pass the solidDB ® server at least the following parameters with the SolidServerControl startServer method:
-c<directory containing solidDB® license file> -U<username> -P<password> -C<catalog>
Note Uppercase and lowercase “C” are both used, and they mean different things.
5 If you have all the necessary files ( ssolidacxx library, communication libraries, JDBC driver, and license file in your current working directory, you can start SJASample with a command line like the following one:
java -Djava.library.path=. -classpath SolidDriver2.0.jar;. SJAsample
Results
Your LLA server is up and running.
See also
This site works best with JavaScript enabled