Better setup for custom Java installation

Fix bug #1305904 (ownership of java files)
Add Java to the PATH and setup the JAVA_HOME env variable
Setup alternatives for java executables

closes-bug: #1305904

Change-Id: I18b87b4eac44b8a5f303dc5d06f268506c7ed300
Merge "Better setup for custom Java installation"