fix bug #5675: Add explicit encoding line to wrapper.conf
fix bug #6217 properly: workaround setups where 'java' is a shell script