Initial pass at Java API support.