Simplify commands for Java, Scala