Added java specific metrics to metrics registry.