Skip to content

Conversation

@marshalhayes
Copy link
Contributor

@marshalhayes marshalhayes commented Oct 11, 2025

Closes #887

This pull request introduces an additional JvmArgs property to JavaAppExecutableResourceOptions which enables passing JVM arguments to executable Java apps when using AddJavaApp.

This is a non-breaking change.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Copilot AI review requested due to automatic review settings October 11, 2025 06:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for passing JVM arguments to executable Java applications in the Community Toolkit. The enhancement allows developers to configure JVM-specific options (like system properties, memory settings, etc.) when using AddJavaApp for executable Java resources.

  • Adds JvmArgs property to JavaAppExecutableResourceOptions class
  • Updates executable Java app creation to prepend JVM arguments before the -jar command
  • Updates test to verify correct argument ordering

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/CommunityToolkit.Aspire.Hosting.Java/JavaAppExecutableResourceOptions.cs Adds new JvmArgs property with XML documentation
src/CommunityToolkit.Aspire.Hosting.Java/JavaAppHostingExtension.Executable.cs Implements logic to prepend JVM arguments to command line
tests/CommunityToolkit.Aspire.Hosting.Java.Tests/ExecutableResourceCreationTests.cs Updates test to include JVM args and verify correct argument ordering

@marshalhayes
Copy link
Contributor Author

@dotnet-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to pass JVM arguments to executable Java apps

2 participants