With the release of Coherence 12.2.1 we have included many examples so you can get hands-on experience existing features as well as getting up to speed with new features such as support for Java8, Cache Persistence, Federation and Async processing API.
Download Coherence & Java 8
- Ensure you have downloaded and installed the latest Java8 SE Developers kit available from OTN
- Download the Coherence Standalone Install from OTN
- Unzip the downloaded file fmw_184.108.40.206.0_coherence_Disk1_1of1.zip which will give you a jar called fmw_220.127.116.11.0_coherence.jar
To install Coherence, follow the instructions in Section 2.2 of Installation Documentation. A shortened version of this is below. (Refer to the above link if you have any issues)
- Open up a command prompt or terminal and set JAVA_HOME environment variable to your installed Java 8 JDK. E.g. for Windows:
- Run java command with -jar option pointing to your downloaded fmw_18.104.22.168.0_coherence.jar. E.g.
%JAVA_HOME%\bin\java -jar c:\downloads\fmw_22.214.171.124.0_coherence.jar
- Click Next and Choose Auto-Updates option.
- Choose an installation location, e.g. c:\Oracle\Middleware\1221 and click Next.
- Ensure you select ‘Coherence with Examples’ option then carry on to complete the installation.
Navigate To the Examples Directory
Once the installation has completed you will find a coherence\examples directory under the installation directory you chose above. E.g. if you installation directory was c:\Oracle\Middleware\1221 then the examples directory will be c:\Oracle\Middleware\1221\coherence\examples.
Within this directory you will find the following directories java, cpp, dotnet and rest. In each of these directories refer to the readme.txt which includes explanations on how to run each example. You can also refer to the online documentation as well.
I’ve included some highlights of the directories and the examples we ship within them:
- rest – This directory contains a modern web application using using AngularJS and Bootstrap to showcase how to access Coherence via REST. This is the only example currently that uses maven to build and run.
- java – Includes various Java examples including:
- Java 8 support including Lambdas, Streams, Map Default methods
- New NamedCache Async API
- Cache Persistence
For more details on the above new features, see my Coherence 12.2.1 Overview post.
Keep your eyes out for a post on how to run the Coherence and WebLogic Server examples.