Reputation: 445
I am using ColdFusion 2016 and want to use this java library from within ColdFusion.
https://github.com/getstream/stream-java
It is not clear what folders are needed to make this work. I'm very new to doing something specifically like this so please excuse my question if isn't phrased correctly.
I tried downloading the entire zip file from github, renaming it with a .jar extension, and dropping it in my CF classpath but I couldn't seem to instantiate any of the classes.
Upvotes: 0
Views: 303
Reputation: 6550
That's because they're not classes. What you downloaded are the .java source files. Sources must be compiled into *.class files before you can use them. The project is set up for Maven, so you can use an IDE like Eclipse to import the project, then run a Maven build which will compile and create the jar for you.
In Eclipse, import the project sources.
Build the jar
Go to Package Explorer, right click the project stream-core and select Run As > Maven Install
Check the console for a success/failure message:
[INFO] BUILD SUCCESS
The compiled jar will be located in a subdirectory named /target
. Example:
C:\temp\stream-java-master\stream-core\target\stream-core-2.0.2-SNAPSHOT.jar
If needed, repeat step 4 ("Build a jar") for the other 3 projects.
Upvotes: 2