# JavaContainerResource

- Kind: `class`
- Package: [Aspire.Hosting.Java](/reference/api/csharp/aspire.hosting.java.md)
- Version: `17.0.0-preview.1.26567.5`
- Namespace: `Aspire.Hosting.Java`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Java/JavaContainerResource.cs)
- Inherits: `ContainerResource`
- Implements: `IResource`, `IResourceWithEndpoints`, `IResourceWithEnvironment`, `IResourceWithServiceDiscovery`, [IJavaAppResource](/reference/api/csharp/aspire.hosting.java/ijavaappresource.md)

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

## Definition

```csharp
namespace Aspire.Hosting.Java;

public class JavaContainerResource
    : Aspire.Hosting.ApplicationModel.ContainerResource,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithEndpoints,
      Aspire.Hosting.ApplicationModel.IResourceWithEnvironment,
      Aspire.Hosting.IResourceWithServiceDiscovery,
      Aspire.Hosting.Java.IJavaAppResource
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Java/JavaContainerResource`
- Public instance properties are exported as ATS capabilities.

## Constructors

- [JavaContainerResource(string, string?)](/reference/api/csharp/aspire.hosting.java/javacontainerresource/constructors.md#constructor-string-string) -- Represents a Java application that runs from a prebuilt container image.

## Properties

- [ResourceTypeDisplayName](/reference/api/csharp/aspire.hosting.java/javacontainerresource/properties.md#resourcetypedisplayname) : `string` `get` -- Gets the default human-readable name of this resource's type.
