# CommunityToolkit.Aspire.Hosting.Java

- Module: `CommunityToolkit.Aspire.Hosting.Java`
- Version: `13.4.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)
- Functions: `10`
- Types: `2`

## Types

- [JavaAppContainerResource](/reference/api/typescript/communitytoolkit.aspire.hosting.java/javaappcontainerresource.md) -- `handle` - 0 members -- A resource that represents a Java application.
- [JavaAppExecutableResource](/reference/api/typescript/communitytoolkit.aspire.hosting.java/javaappexecutableresource.md) -- `handle` - 7 members -- A resource that represents a Java application.

## Functions

- [addJavaApp](/reference/api/typescript/communitytoolkit.aspire.hosting.java/addjavaapp.md) -- `method` -- Adds a Java application to the application model. Executes the executable Java app.
- [addJavaAppWithJar](/reference/api/typescript/communitytoolkit.aspire.hosting.java/addjavaappwithjar.md) -- `method` -- Adds a Java application to the application model. Executes the executable Java app.
- [addJavaContainerApp](/reference/api/typescript/communitytoolkit.aspire.hosting.java/addjavacontainerapp.md) -- `method` -- Adds a Java application to the application model. Executes the containerized Java app.
- [withGradleBuild](/reference/api/typescript/communitytoolkit.aspire.hosting.java/withgradlebuild.md) -- `method` -- Adds a Gradle build step to the Java application
- [withGradleTask](/reference/api/typescript/communitytoolkit.aspire.hosting.java/withgradletask.md) -- `method` -- Configures the Java application to run using a Gradle task
- [withJvmArgs](/reference/api/typescript/communitytoolkit.aspire.hosting.java/withjvmargs.md) -- `method` -- Configures the Java Virtual Machine arguments for the Java application. The arguments are set via the `JAVA_TOOL_OPTIONS` environment variable, which is recognized by the JVM regardless of how the application is launched (e.g., `java -jar`, Maven wrapper, or Gradle wrapper).
- [withMavenBuild](/reference/api/typescript/communitytoolkit.aspire.hosting.java/withmavenbuild.md) -- `method` -- Adds a Maven build step to the Java application
- [withMavenGoal](/reference/api/typescript/communitytoolkit.aspire.hosting.java/withmavengoal.md) -- `method` -- Configures the Java application to run using a Maven goal
- [withOtelAgent](/reference/api/typescript/communitytoolkit.aspire.hosting.java/withotelagent.md) -- `method` -- Configures the OpenTelemetry Java Agent for the Java application.
- [withWrapperPath](/reference/api/typescript/communitytoolkit.aspire.hosting.java/withwrapperpath.md) -- `method` -- Configures a custom build tool wrapper script path. This is useful when the wrapper script is not in the default location or has a non-standard name.
