# Exporting metrics to publichost using Java client

**URL:** <https://discuss.prometheus.io/t/exporting-metrics-to-publichost-using-java-client/1254>\
**Category:** Exporters and Metrics\
**Created:** [October 19, 2022, 4:42pm UTC](https://discuss.prometheus.io/t/exporting-metrics-to-publichost-using-java-client/1254 "2022-10-19T16:42:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrod99](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jrod99](https://discuss.prometheus.io/u/jrod99)\
**Post date:** [October 19, 2022, 4:42pm UTC](https://discuss.prometheus.io/t/exporting-metrics-to-publichost-using-java-client/1254/1 "2022-10-19T16:42:06Z")

</div>

Hello,  
I am using Java Client to expose metrics. In my [localhost.com:8484/metrics](http://localhost.com:8484/metrics) I can see my metrics. Do I have to use metricsservlet and how does it work  
When I run my application:

```auto
@SpringBootApplication
@EnableConfigurationProperties
public class CustomApp{

    public static void main(String[] args) {

        SpringApplication.run(CustomApp.class, args);
        try {
            HTTPServer server = new HTTPServer.Builder()
                    .withPort(1234)
                    .build();
        } catch() ...

```

things seem to work fine as I get no error and it doesn’t enter the catch block. However, when I try to find the metrics on [publichost.com/8484/metrics](http://publichost.com/8484/metrics) it doesnt find the endpoint or point.  
Any idea on what I’m missing?
