Skip to content

Recommend adding a feature to configure custom Maven parameters. #9571

Description

@AndyLuke

Description

In the "Tools -> Options -> Java Tab -> Maven Tab" settings, it is not possible to set custom temporary variables or JVM parameters for Maven; we recommend adding this feature. In a Windows environment, the default system encoding is GBK. When you open a class in NetBeans and run it, and the output contains Chinese characters, the Chinese text in the console appears as garbled characters. There are two ways to avoid garbled characters: Method 1: Add the variable JAVA_TOOL_OPTIONS to the system environment variables or maven.bat, with the value -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dconsole.encoding=UTF-8. Method 2: Run the class once, then click the “Re-run with different parameters” button on the left side of the console and set the value of the exec.vmArgs option to -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dconsole.encoding=UTF-8. However, neither of these methods is ideal. The first method affects the entire system, while the second requires reconfiguring the setting every time the class is run, which is extremely inconvenient.

Use case/motivation

No response

Related issues

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:featureA feature requestneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions