NDFS Java wrapper HOWTO:

Here is what you need to build the java wrapper:

Prerequisites:

1.Before starting these steps, you must have compiled the NDFS-II project.
2.Add this java folder into your SF2_ROOT directory.
3.Windows users must define a JAVA_HOME environment that point to the installation 
folder of the Java development kit (JDK).
	
Let's assume that your Smartflow2 project is located in the folder SF2_ROOT

Building : 
Step 1: C++/JNI
	You can choose between two methods to build the JNI wrapper:
	1. Using the Xcode or Visual Studio IDE (OSX and Windows)
	    Xcode:
	       Load the solution file for the Smartflow2 (SF2_ROOT/sf2.xcodeproj)
	       Select the  “Smartflow2java” target and make sure that the “Active Configuration” is set to “Release”.
	       Build the “Smartflow2java” target
	    Visual Studio:
	       Load the solution file for the Smartflow2 (SF2_ROOT/sf2.sln)
	       Select "Release" as "Active solution configuration"
	       Build the “Smartflow2java” solution.	
 	2. Traditional Make configuration (Linux and OSX)
Step 2: Java
	Using Netbeans open and build the project named “smartflow2” located at SF2_ROOT/java.

Examples:
The folder SF2_ROOT/java/demo contains two java examples that use the wrapper to access the NDFS C++ API:
 Provider : provides a flow of “double”.
 Consumer: consumes the flow and display the data on the standard output.
 	Build:
	    Using Netbeans, open and build the two projects : “SF2_ROOT/java/demo/consumer” and “SF2_ROOT/java/demo/provider”.
 	 Run:
1. Run the “sf2d” server.
2. Run the provider : java -Djava.library.path=$SF2_ROOT/lib -jar $SF2_ROOT/java/demo/Provider/dist/Provider.jar
3. Run the consumer: java -Djava.library.path=$SF2_ROOT/lib -jar $SF2_ROOT/java 

If you would like to contact us regarding an issue with the Java Wrapper, please contact Imad Hamchi: imad.hamchi@nist.gov
