---
title: "Running a Java Micronaut application in Visual Studio Codespaces"
date: 2020-05-18T00:00:00+00:00
author: "poornerd"
tags: ["java", "micronaut", "ide"]
canonical: https://www.poornerd.com/2020/05/18/developing-java-micronaut-visual-studio-codespaces.html
source: Raw Markdown twin of the HTML article; content is the original source.
---
So you can use ([https://sdkman.io](https://sdkman.io)) to install any Java version you want (like the Amazon Correto in case you plan on deploying to Elastic Beanstalk):
```
sdk install java 11.0.7-amzn
```

However, for most cases you should be fine with the pre-installed OpenJDK 1.8.

![Visual Studio Codespaces - Port Forwarding](/images/posts/vso_java_micronaut2.png){:class="img-fluid w-100"}

First you will want to identify which port your application will start and map the port.  I was starting my Micronaut application on port 5000 with ./gradlew .  

You will want to open the remote explorer (see sidebar in screenshot), add a "Forwarded Port", and then click on the copy URL icon next to port to get the URL your application will be reachable on (don't enter the port - it will be forwarded to the one you indicated).

Open the URL in your browser, and you "are in".


