- added format patch (workaround to build with -Werror=format-security)
- hacks to fix java detection