Do not use JDK1.8.0_151 due to a known issue. This issue is fixed in JDK 1.8.0_162-ea. However, use JDK 1.8.0_144 until the latter mentioned version is released.
If you are using an Oracle JDK version lower than 8u161, you need to download the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy files from here and add the files to the security directory of your Java installation to avoid illegal key size errors when you try to invoke a secured Web service.
Oracle is supported when running (not building) WSO2 products.
IBM JRE 1.7 is not supported from 5.4.0 onwards for running WSO2 products.