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

JDK_16 error #1684

Closed
IgorGanapolsky opened this issue Nov 29, 2019 · 10 comments
Closed

JDK_16 error #1684

IgorGanapolsky opened this issue Nov 29, 2019 · 10 comments
Labels

Comments

@IgorGanapolsky
Copy link

Hello,
I am not able to run any code nor unit tests in this repo. IntelliJ constantly gives this error:

Build file '/Users/igorganapolsky/workspace/git/kotiln/kotlinx-coroutines-core/build.gradle' line: 61
Execution failed for task ':kotlinx-coroutines-core:checkJdk16'.
JDK_16 environment variable is not defined. Can't build against JDK 1.6 runtime and run JDK 1.6 compatibility tests. Please ensure JDK 1.6 is installed and that JDK_16 points to it.

@qwwdfsad
Copy link
Member

qwwdfsad commented Nov 30, 2019

Have you tried to define JDK_16 environment variable as [documentation] (https://github.com/Kotlin/kotlinx.coroutines#building) and error message suggest?

@IgorGanapolsky
Copy link
Author

Why is JDK_16 required for coroutines?

@qwwdfsad
Copy link
Member

qwwdfsad commented Dec 2, 2019

Because kotlinx.coroutines is compatible with Java 6 (Android 14 I suppose) and we ensure that by running tests with JDK 6

@imanushin
Copy link

@IgorGanapolsky , see also #1589 for coroutines + JDK6.

@IgorGanapolsky
Copy link
Author

So it sounds like JDK6 requirement will be dropped in the near future :)

@MilkBiscuit
Copy link

I still can see this issue.

Can not run 'exampleBasic09' until I comment below code in build.gradle

        if (!System.env.JDK_16) {
            throw new GradleException("JDK_16 environment variable is not defined. " +
                    "Can't build against JDK 1.6 runtime and run JDK 1.6 compatibility tests. " +
                    "Please ensure JDK 1.6 is installed and that JDK_16 points to it.")
        }

I don't understand why you are still keeping this code.

@elizarov
Copy link
Contributor

We have to ensure that we don't accidentally build it against a later version of JDK 1.6 and accidentally use classes not present in JDK 1.6. As spelled out in contribution guide, you can simply set JDK_16 to JAVA_HOME.

@mcpiroman
Copy link

I've heard kotlin 1.5 no longer supports java 1.6 (and 1.7). Should it be dropped here, too?

@qwwdfsad qwwdfsad reopened this Jun 15, 2021
@qwwdfsad qwwdfsad added build and removed question labels Jun 15, 2021
@qwwdfsad
Copy link
Member

Thanks, that's worth taking care of to simplify the life of external contributors.
It's a big bigger than just removing it from Gradle, because it requires some changes in our TC infrastructure as well

@qwwdfsad
Copy link
Member

qwwdfsad commented Dec 7, 2021

Fixed in current develop

@qwwdfsad qwwdfsad closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants