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

Restrict toolchain vendor to ADOPTIUM #16

Open
teddyxlandlee opened this issue Nov 9, 2023 · 5 comments
Open

Restrict toolchain vendor to ADOPTIUM #16

teddyxlandlee opened this issue Nov 9, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@teddyxlandlee
Copy link

I am an IBM Semeru user and when I tried to ./gradlew build the MDK I stuck at neoFormRecompile, where the compiler failed to find the jdk.jfr package.

Since all Neo projects need to do the recompile process, the toolchain vendor should be restricted, at least out of the J9 implementation, to prevent beginners stuck at the same point as me.

What I tried to do is to remove all the caches and then add a line in build.gradle:

java.toolchain.vendor = JvmVendorSpec.ADOPTIUM

and it worked.

Many Thanks.

@UpcraftLP
Copy link

If a specific vendor is to be enforced, it should be microsoft, since this is what Mojang ships with the game by default.

@UpcraftLP
Copy link

UpcraftLP commented Feb 3, 2024

However, it is possible to only specify the implementation, not the vendor.
I will make a PR with that.

EDIT: seems like gradle only allows switching between "any" and "openJ9" :/

@lukebemish
Copy link

lukebemish commented Mar 16, 2024

EDIT: seems like gradle only allows switching between "any" and "openJ9" :/

You're thinking JvmImplementation, which can be J9 or VENDOR_SPECIFIC. Specifying the vendor uses the line in the initial issue, and can be set to any number of different things - and will get correctly resolved so long as the foojay settings plugin is applied. To set it to microsoft, you'd use:

java.toolchain.vendor = JvmVendorSpec.MICROSOFT

That said - the real solution here is to avoid needing a full decomp/recomp cycle to set up the local environment!

@UpcraftLP
Copy link

You're thinking JvmImplementation, which can be J9 or VENDOR_SPECIFIC

Yes, exactly what I said. Gradle does not currently allow specifying HOTSPOT or not OpenJ9 as JvmImplementation.



the real solution here is to avoid needing a full decomp/recomp cycle to set up the local environment!

that is true, but in absence of someone making that PR, the quickest 'fix' is to at least provide a better error message.

@lukebemish
Copy link

lukebemish commented Mar 17, 2024

It allows specifying "openj9" or "whatever" for implementation, yes, but it also allows specifying vendor - so just specify Microsoft as the vendor and you'll get their openjdk - the "vendor specific" implementation for Microsoft is hotspot

@sciwhiz12 sciwhiz12 added the enhancement New feature or request label Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants