java api over scala