Skip to content
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

SDK to use and bundle JDK 17 #473

Merged
merged 15 commits into from
Feb 21, 2023
Merged

Conversation

tonihele
Copy link
Contributor

Resolves #471

Hmm, yeah. This can be run locally now. Probably releasing needs a bit tweaking. Pack200 doesn't exist. These params added to project.properties need to go to the configuration of the release.... But I don't know how really to test this.

@tonihele
Copy link
Contributor Author

tonihele commented Feb 19, 2023

It does work, I tested it. On Linux though, built the installers and it works. There is couple of things I learned in the process and I wish to share them with you.

nbproject/project.properties file has a property run.args.extra. Basically JVM args when you run the SDK. These used to get copied to the actual installation (etc/jmonkeyplatform.conf) back in Netbeans 8 age. I'm not exactly sure when this broke down. But it did broke with newer NB releases as they cleaned the default harness app.conf file not to have any memory params or anything like that.

With this PR this functionality is restored. With that I stripped the old JVM args that should not be used anymore. And replaced those with some that are needed with modern JDKs. At least for awhile now before Netbeans fixes their code to be more native to modern SDKs.

This however solves this issue I always wondered. The issue of graphic corruption (https://hub.jmonkeyengine.org/t/solved-sdk-3-3-and-gui-issue/45642/24). I'm also a victim of this. But it hasn't happened now again, so I did not include the flags. This bug never happened to me when debugging or running the SDK via Netbeans. And I finally found the answer why, most likely it is this. Old SDK versions worked because the args were copied. I did not however now include the parameters. Lets track this. It is maybe even fixed and no need for those parameters anymore.

The flags needed by modern JDKs are all in https://github.com/apache/netbeans/tree/master/nbbuild/jms-config. But I only included what I needed. Or rather what I encountered. This is the suggested way anyhow.

edit: I re-added the -J-Dsun.java2d.noddraw=true. That WAS the flag that prevents the screen tearing for me. Tested. So this also fixes this bug from future releases.

@tonihele
Copy link
Contributor Author

I'll merge this in 48h if no objections.

@tonihele tonihele changed the title Feature/issue 471 SDK to use and bundle JDK 17 Feb 21, 2023
@tonihele tonihele merged commit eaf15c8 into jMonkeyEngine:master Feb 21, 2023
@tonihele tonihele deleted the feature/issue-471 branch February 21, 2023 16:09
@tonihele tonihele added this to the 3.6 milestone Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Java to 17
1 participant