insastrasbge1 opened a new issue, #7711:
URL: https://github.com/apache/netbeans/issues/7711
### Apache NetBeans version
Apache NetBeans 22
### What happened
When you define a VM option in the properties of a maven project, this
option is copied into the exec.vmArgs parameter of the “run project” action,
but not into the same parameter of the “run file via main()” action.
### Language / Project Type / NetBeans Component
Java Application Maven Project
### How to reproduce
A particularly painful example:
Under Windows, there is an incompatibility between the netbeans console and
the output of a program defined by a “java with maven; java application”
project:
1) Create a new “java with maven; java application”
2) in the main method automaticaly generated, change "Hello World!" by "déjà"
3) run the project (F6)
==> you get in the netbeans output console : d�j�
4) go to project properties ; run ; vm options and add
-Dstdout.encoding=UTF-8
5) run again the project (F6)
==> you get in the netbeans output console : déjà
6) now run the file (shift-F6)
==> you get in the netbeans output console : d�j�
there is a notable difference between running the project and running the
current file (containing a class with a main method)
You can see the difference by opening “Actions” in the project properties
and successively selecting the actions “run project” and “run file via main()”.
Under "run projet" you have : exec.vmArgs=-Dstdout.encoding=UTF-8
Under "run file via main()" you have only : exec.vmArgs= (empty)
it's the same for “debug project” and “debug file by main()”.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 11
### JDK
java version "22" 2024-03-19 Java(TM) SE Runtime Environment Oracle GraalVM
22+36.1 (build 22+36-jvmci-b02) Java HotSpot(TM) 64-Bit Server VM Oracle
GraalVM 22+36.1 (build 22+36-jvmci-b02, mixed mode, sharing)
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists