More effective install-time workaround for Java