Fix the Java example. Also addfile works in local mode now
Fix the scala example