# 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="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FMCxzzrN4wHEck1z2ivPr%2Fimage.png?alt=media&#x26;token=16db7855-8567-43fe-9ebe-12ce258326b2" 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](https://docs.toystack.ai/get-started/deploying-with-docker) 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="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FJIm0VwNJ5XDMfiztVQvT%2Fimage.png?alt=media&#x26;token=0e9a0a49-6c45-44c7-8329-b2dbd4ddef88" 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](https://docs.toystack.ai/get-started/environment-variables-setup) page.

## Step 5: Choose a plan

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2Fi6AxZOCTmXGxRvbBn91g%2FBackend%20plan%20select.png?alt=media&#x26;token=8f59d21d-f559-4466-83eb-db5c5e104ae1" alt=""><figcaption></figcaption></figure>

## Step 6: Deploy

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