Few JDK9 related & general changes

Changes apply to older JDKs as well.
That is different, that just check passed configuration not what jdk supports / returns.
And we should not fail in any case as in case of IBM jvm we also ignore permgen configuration. as it is not supported by jvm.