Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Windows: Does not spawn process to start server on windows #9

Description

@Vishal-Joshi

I am using SpawnProcessTask to start embedded server in my application. Following is the gradle task:-

task startServer(group: "Exec", description: 'Starts the service in the background', type: SpawnProcessTask, dependsOn: 'createCapsule') {
command "java -jar ${projectDir}/build/libs/capsule.jar server ${projectDir}/config/local.yml"
ready 'org.eclipse.jetty.server.Server: Started'
directory "."
}

The above task performs perfectly fine on linux but fails on windows. Following is the exception I am getting:-


FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':startServer'.

    java.lang.NoSuchFieldException: pid

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions