Added kmeans as an example for the new java api.