Porting VectorDot example to Java

Thanks for doing that.