I need to run spring cloud on Java 1.6.
I tried spring Initializr which gave Java 1.8 in build.gradle even though selected one is Java 1.6.
I looked into Which Java version is supported by Spring Cloud? which wasn't much help.
I tried compiling Spring cloud on java 6 which resulted in
" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationListener : org.springframework.cloud.bootstrap.BootstrapApplicationListener "
which is
Caused by: java.lang.UnsupportedClassVersionError: org/springframework/cloud/bootstrap/BootstrapApplicationListener : Unsupported major.minor version 51.0
If its possible, posting the config required in gradle script would be helpful.
No, it is not possible to use Java 6 and Spring Cloud.
The baseline is Java 7. A couple of Spring Cloud projects have optional modules that require Java 8 and hence JDK 8 is required to compile the whole project, but the modules target Java 7 unless needed.
Next year, starting with the Edgware Release Train, Spring Cloud will move to a Java 8 baseline following Spring Framework 5 and Spring Boot 2.