# WithWrapperPath

- Module: [Aspire.Hosting.Java](/reference/api/go/aspire.hosting.java.md)
- Version: `17.0.0-preview.1.26565.2`
- Kind: `method`
- Defined on: [`JavaAppResource`](/reference/api/go/aspire.hosting.java/javaappresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Overrides the build tool wrapper script path, for repositories whose wrapper is not in the default location or does not use the default name.

## Remarks

May be called before or after the build tool is configured. A later call re-points anything that
already resolved the default wrapper, so the result does not depend on the order of builder calls.

## Definition

```go
func (JavaAppResource) WithWrapperPath(wrapperPath string) JavaAppResource
```

## Parameters

- `wrapperPath` (`string`) -- The path to the wrapper script, absolute or relative to the resource's working directory.

## Returns

[`JavaAppResource`](/reference/api/go/aspire.hosting.java/javaappresource.md) -- A reference to the `IResourceBuilder`.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`JavaAppResource`](/reference/api/go/aspire.hosting.java/javaappresource.md)
