Skip to content

jvmArguments cause daemon unable start #1667

@THLIVSQAZ

Description

@THLIVSQAZ

Extension Name: vscode-gradle
Extension Version: 3.16.4
OS Version: ubuntu 24.04.2 LTS
VSCode version: 1.99.3

Describe the bug
use java.import.gradle.jvmArguments will unable start daemon

To Reproduce
set java.import.gradle.jvmArguments to -Xmx2G

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Image

Image

Image

Output from "Gradle for Java"

[info] [gradle-server] Gradle Server started, listening on 36147
[info] Gradle client connected to server
[info] Java Home: /home/ubuntu/toolchains/jdk11
[info] JVM Args: --add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-Xmx2G,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /home/ubuntu/.gradle
[info] Gradle Version: 6.4.1
[info] [gradle-server] [ERROR] Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.4.1-bin.zip'.
Problem with provided build arguments: [--init-script, /tmp/4f5c6f29ec59976f766c05ce58955aab2ed6151d8274b699e654922857bc1877.gradle, -Xmx2G]. 
Unknown command-line option '-X'.
Either it is not a valid build option or it is not supported in the target Gradle version.
Not all of the Gradle command line options are supported build arguments.
Examples of supported build arguments: '--info', '-p'.
Examples of unsupported build options: '--daemon', '-?', '-v'.
Please find more information in the javadoc for the BuildLauncher class.
[error] Error getting build for /home/ubuntu/project/mdm: Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.4.1-bin.zip'.
Problem with provided build arguments: [--init-script, /tmp/4f5c6f29ec59976f766c05ce58955aab2ed6151d8274b699e654922857bc1877.gradle, -Xmx2G]. 
Unknown command-line option '-X'.
Either it is not a valid build option or it is not supported in the target Gradle version.
Not all of the Gradle command line options are supported build arguments.
Examples of supported build arguments: '--info', '-p'.
Examples of unsupported build options: '--daemon', '-?', '-v'.
Please find more information in the javadoc for the BuildLauncher class.
[info] Java Home: /home/ubuntu/toolchains/jdk11
[info] JVM Args: --add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-Xmx2G,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /home/ubuntu/.gradle
[info] Gradle Version: 6.4.1
[info] [gradle-server] [ERROR] Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.4.1-bin.zip'.
Problem with provided build arguments: [--init-script, /tmp/4f5c6f29ec59976f766c05ce58955aab2ed6151d8274b699e654922857bc1877.gradle, -Xmx2G]. 
Unknown command-line option '-X'.
Either it is not a valid build option or it is not supported in the target Gradle version.
Not all of the Gradle command line options are supported build arguments.
Examples of supported build arguments: '--info', '-p'.
Examples of unsupported build options: '--daemon', '-?', '-v'.
Please find more information in the javadoc for the BuildLauncher class.
[error] Error getting build for /home/ubuntu/project/mdm: Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.4.1-bin.zip'.
Problem with provided build arguments: [--init-script, /tmp/4f5c6f29ec59976f766c05ce58955aab2ed6151d8274b699e654922857bc1877.gradle, -Xmx2G]. 
Unknown command-line option '-X'.
Either it is not a valid build option or it is not supported in the target Gradle version.
Not all of the Gradle command line options are supported build arguments.
Examples of supported build arguments: '--info', '-p'.
Examples of unsupported build options: '--daemon', '-?', '-v'.
Please find more information in the javadoc for the BuildLauncher class.
[info] Found 0 tasks
[info] Java Home: /home/ubuntu/toolchains/jdk11
[info] JVM Args: --add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-Xmx2G,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /home/ubuntu/.gradle
[info] Gradle Version: 6.4.1
[info] [gradle-server] [ERROR] Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.4.1-bin.zip'.
Problem with provided build arguments: [--init-script, /tmp/4f5c6f29ec59976f766c05ce58955aab2ed6151d8274b699e654922857bc1877.gradle, -Xmx2G]. 
Unknown command-line option '-X'.
Either it is not a valid build option or it is not supported in the target Gradle version.
Not all of the Gradle command line options are supported build arguments.
Examples of supported build arguments: '--info', '-p'.
Examples of unsupported build options: '--daemon', '-?', '-v'.
Please find more information in the javadoc for the BuildLauncher class.
[error] Error getting build for /home/ubuntu/project/mdm: Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.4.1-bin.zip'.
Problem with provided build arguments: [--init-script, /tmp/4f5c6f29ec59976f766c05ce58955aab2ed6151d8274b699e654922857bc1877.gradle, -Xmx2G]. 
Unknown command-line option '-X'.
Either it is not a valid build option or it is not supported in the target Gradle version.
Not all of the Gradle command line options are supported build arguments.
Examples of supported build arguments: '--info', '-p'.
Examples of unsupported build options: '--daemon', '-?', '-v'.
Please find more information in the javadoc for the BuildLauncher class.
[info] Found 0 tasks

Does the bug still exist if you disable all other extensions?
Yes

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions