Display output(metrics) of a java program as graphs in Grafana

A plugin that runs the java code? Is this output value in a file or an http like response or a java command line response?