New init method to work with JRuby