-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java8 on windows runs on Java 11 #131
Comments
Is this for Java 8 on Windows 'any' or just for ARM? I wonder if it has to do with the change in numbering scheme, because Java 8 was really 'Java 1.8' under the covers. |
This is Java 8 on all windows. Not just ARM. Found the issue. In OpenJDK 8, the windows bootstrap uses global registry keys to locate Java Home. It doesn't use the JAVA_HOME environment variable or the path. On other environments, jDeploy is able to just set the environment variable before creating the VM environment. On Java 8, however, it just ignores this. Looks like it will look for a java.dll located in the same directory as the exe file, but I don't think this will be helpful in jDeploy's case. I can think of two solutions to support Java 8 on windows.
These could be done for Java8/Windows only, since that seems to be the only platform combination that is affected. Java 11+ windows works fine, and Java8 linux/mac work fine. |
Either sounds good to me. I hardly have any users of SnapCode (unfortunately). It doesn't help that I'm stuck on Java 8, but I'm not sure the CheerpJ folks have much financial incentive to accelerate their Java 11+ schedule. |
I forgot to say thanks for taking the time to look into this. In my opinion, JDeploy is the only thing that makes Java desktop viable. Much better than Java WebStart was. :-) |
Finally have something working. Will have a release tomorrow with the fix. Solution was to use a dedicated jre for java 8 on windows. This required a slightly different file layout in the app directory but this is transparent to the user and developer. no changes should be required. You'll just need to reinstall the app. Dedicated jre support is something i planned on adding anyway. so this groundwork will be helpful for when I add that as a feature. (right now it isn't a specific feature.. is just used for java 8 on windows) |
Very nice, thank you! |
This also adds some new integration tests for installers
Took a little longer to get this release out because Github retired some of the runners I was using for builds, so I had to perform some CI/CD surgery. But it is now released in v4.0.49. You just need to download and run the installer for your app again. Seemed to be working okay for me on Windows 11. |
Thanks Steve! This works for me as well now! Though I forgot how bad Java 8 is with "HiDPI" screens. I have to manually set the "Override HiDPI scaling behavior" to get normal sized windows. And the text rendering is very wacky for some reason. But this will get me by until the CheerpJ folks get Java 11+ out. :-) |
oh, maybe there's something I can do about that in the launcher. |
This SO thread talks about this. https://superuser.com/questions/988379/how-do-i-run-java-apps-upscaled-on-a-high-dpi-display Seems in Java 8, swing advertises that it is dpi aware, but is not so windows doesn't override it. And unfortunately java 8 provided no way to override this. This was fixed in java 9. It suggests that a solution is to add a manifest to the exe. I'll look into that. |
Thanks - that would be useful. I was looking at exactly that link this morning. |
I managed to get the dpi scaling behaviour working "correctly" with Java 8 on Windows now. Will release it in the next update - maybe tomorrow. As you said, it is still a little burry, and the text is a little strange, but I think it is better than the alternative, where everything is tiny. This should be exactly the same result as if you manually check that "Override HiDpi scaling behaviour" box. |
Yes, it's definitely better to have that override turned on. I don't think I'll be able to do anything about the wacky text rendering - I think it's an artifact of scaling the small window backing store up by 2x. Just have to live with it until I can move to Java 9+. |
* fix: hidpi support on Java 8 in windows #131 * updated launcher with debugger improvements
Published new version that fixes the HiDPI issue as discussed here. It should just work if you download+reinstall your app again. |
Works perfect - thanks Steve! |
Currently there is a problem with Java 8 on windows. If an app specifies javaVerson=8, then it will actually run on Java 11.
The reason is because there is a "worse" bug with Java 8 on windows that is causing the app to fail to launch.
E.g.
Now, this works fine before the launcher has the app.xml appended. Not sure which of those is the actual problem.
Need to investigate 3 possible areas:
The text was updated successfully, but these errors were encountered: