Fix behaviour of install commands for Java and Erlang