> For the complete documentation index, see [llms.txt](https://docs.toystack.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toystack.ai/backend-quickstarts/java.md).

# Java

## Step 1: Import your Git repository

Go to the [ToyStack Dashboard](https://dashboard.toystack.ai) and create a new project using your repository.

## Step 2: Select Java as your Framework Preset

ToyStack can automatically deploy your Java projects. Simply select `Java` as the preset while deploying the application.

<figure><img src="/files/IqKyB8MTRflpw77F3rjp" alt=""><figcaption></figcaption></figure>

If you run into issues or you'd like to use your custom configuration, you can use `DOCKER` as the framework instead. You can read more about it in the [Deploying with Docker](/get-started/deploying-with-docker.md) page.

## Step 3: Specify Build Commands

There may be framework specific build commands that are needed for your application. You can specify that in the configuration.

<figure><img src="/files/8qRVpnv6axMLIQNKR2qW" alt=""><figcaption></figcaption></figure>

## Step 4: Input environment variables

{% hint style="info" %}
Please ensure the `PORT` number matches the one specified in your app or`Dockerfile`
{% endhint %}

For detailed instructions, please see the [Environment Variables](/get-started/environment-variables-setup.md) page.

## Step 5: Choose a plan

<figure><img src="/files/cWa6RjkgngmQFzPFFWRv" alt=""><figcaption></figcaption></figure>

## Step 6: Deploy

Simply select the branch you want to deploy, its deployment validity and ToyStack will deploy it
