withMainClass

Method
📦 Aspire.Hosting.Java v17.0.0-preview.1.26567.5
interface JavaAppResource {
// ... omitted for brevity
withMainClass(mainClass: string): JavaAppResource;
}

Signature

methodwithMainClassbuilder
Sets the main class an IDE launches when running or debugging this application. Has no effect on how Aspire starts the process, which is decided by the JAR path, Maven goal, or Gradle task.
withMainClass(mainClass: string): JavaAppResource
mainClassstringThe fully qualified name of the class declaring `main`, for example `com.example.Application`.
JavaAppResource

Applies to

This method applies to the following types: