# JavaAppContainerResourceOptions Properties

- Package: [CommunityToolkit.Aspire.Hosting.Java](/reference/api/csharp/communitytoolkit.aspire.hosting.java.md)
- Type: [JavaAppContainerResourceOptions](/reference/api/csharp/communitytoolkit.aspire.hosting.java/javaappcontainerresourceoptions.md)
- Kind: `Properties`
- Members: `7`

This represents the options entity for configuring a Java application running in a container.

## Args

- Name: `Args`
- Modifiers: `nullable` `get; set`
- Returns: `string[]?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppContainerResourceOptions.cs)

Gets or sets the arguments to pass to the Java application.

```csharp
public string[]? Args { get; set; }
```

## ContainerImageName

- Name: `ContainerImageName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppContainerResourceOptions.cs)

Gets or sets the container image name.

```csharp
public string? ContainerImageName { get; set; }
```

## ContainerImageTag

- Name: `ContainerImageTag`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppContainerResourceOptions.cs)

Gets or sets the container image tag. Default is `latest`.

```csharp
public string ContainerImageTag { get; set; }
```

## ContainerRegistry

- Name: `ContainerRegistry`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppContainerResourceOptions.cs)

Gets or sets the container registry. Default is `docker.io`.

```csharp
public string? ContainerRegistry { get; set; }
```

## OtelAgentPath

- Name: `OtelAgentPath`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppContainerResourceOptions.cs)

Gets or sets the OpenTelemetry Java Agent path.

```csharp
public string? OtelAgentPath { get; set; }
```

## Port

- Name: `Port`
- Modifiers: `get; set`
- Returns: `int`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppContainerResourceOptions.cs)

Gets or sets the port number. Default is `8080`.

```csharp
public int Port { get; set; }
```

## TargetPort

- Name: `TargetPort`
- Modifiers: `get; set`
- Returns: `int`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Java/JavaAppContainerResourceOptions.cs)

Gets or sets the target port number. Default is `8080`.

```csharp
public int TargetPort { get; set; }
```
