Add Java classes and build script