Ensure right java is used

Not tested this yet - will do on next project creation.