JavaPackager icon indicating copy to clipboard operation
JavaPackager copied to clipboard

Some System properties seem to be ignored in final build prism.allowhidpi

Open sproket opened this issue 1 year ago • 4 comments

I'm submitting a…

  • [X] bug report
  • [ ] feature request
  • [ ] other

Short description of the issue/suggestion:

Setting the property prism.allowhidpi is ignored in final build

Steps to reproduce the issue/enhancement:

  • In Windows set display scale to 125%
  • Clone this repo: https://github.com/sproket/demo2
  • Run Launcher in IDE (launcher turns scaling off - scaling is off)
  • mvn clean
  • mvn install

check the target directory and run "demo.exe" Window will be scaled so the EXE is not seeing the System property

What is the expected behavior?

Window should not be scaled since we set System.setProperty("prism.allowhidpi", "false");

What is the current behavior?

Window scales.

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

What is the motivation / use case for changing the behavior?

It doesn't work.

Please tell us about your environment:

  • JavaPackager version:n1.7.6
  • OS version: Windows 11
  • JDK version: 22
  • Build tool:
    • [X] Maven
    • [ ] Gradle

sproket avatar Nov 02 '24 11:11 sproket

Additional: It works fine with Launch4j option. It might just be a documentation task.

sproket avatar Nov 03 '24 15:11 sproket

Hi @sproket! Do you mean that if we set -Dprism.allowhidpi=false in ${exeName}.l4j.ini as explained here it works?

fvarrui avatar Nov 03 '24 19:11 fvarrui

I didn't have to do that. All I changed was changing winrun4j to launch4j and it worked. :)

sproket avatar Nov 04 '24 00:11 sproket

I didn't have to do that. All I changed was changing winrun4j to launch4j and it worked. :)

Oh, sorry, I missed that you were using WinRun4J instead of Launch4J 😅

So, the problem is in WinRun4J ... VM arguments are not working as expected.

fvarrui avatar Nov 04 '24 10:11 fvarrui