# JavaContainerResource Constructors

- Package: [Aspire.Hosting.Java](/reference/api/csharp/aspire.hosting.java.md)
- Type: [JavaContainerResource](/reference/api/csharp/aspire.hosting.java/javacontainerresource.md)
- Kind: `Constructors`
- Members: `1`

Represents a Java application that runs from a prebuilt container image.

<a id="constructor"></a>
<a id="constructor-string-string"></a>

## JavaContainerResource(string, string?)

- Name: `Constructor(string, string?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Java/JavaContainerResource.cs#L15)

Represents a Java application that runs from a prebuilt container image.

```csharp
public class JavaContainerResource
{
    public JavaContainerResource(
        string name,
        string? entrypoint = null)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource in the application model.
- `entrypoint` (`string?`) `optional`
  An optional entrypoint that replaces the image's own.
