I copied the runtime properties file from appdata\openmrs to the tomcat folder and it is now working.
The problem is I can’t compile openmrs-core with java 1.6. The version I deployed was built with java 1.8. I would really like to compile it with java 1.6.
As for modules, currently we only guarantee then to build and run on java 6 and i think 7 but i can’t guarantee they would on java 8. So you have to keep in mind the project and branch you are working on to point it to the correct JDK.