java api for env