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 version compatibility #67

Closed
jbaron opened this issue Feb 26, 2021 · 8 comments
Closed

JDK version compatibility #67

jbaron opened this issue Feb 26, 2021 · 8 comments

Comments

@jbaron
Copy link

jbaron commented Feb 26, 2021

When I try to use a newer version of Plotly.kt (v0.3.0) in a Kotlin Jupyter notebook, it doesn't work due to the following error when trying to plot something:

Line_9.jupyter.kts (2:5 - 12) Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
Line_9.jupyter.kts (3:5 - 11) Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

I guess this error is caused by the fact that the Kotlin notebook kernel is compiled against version 1.8 while newer versions of Plotly.kt use JVM version 11 as build target.

Is there any known solution to make this combination working?

@altavir
Copy link
Member

altavir commented Feb 26, 2021

Hi, @jbaron, thank you for the issue. The problem is actually this one: Kotlin/kotlin-jupyter#81. I did not check it lately, but I think it should be fixed in dev versions. It is a bug in scripting configuration and should be easy to fix.

cc @ileasile

@jbaron
Copy link
Author

jbaron commented Feb 26, 2021

Looks indeed like same issue, thanks!!! If I have some time, will try to install the Kotlin notebook kernel from the dev channel to see if that helps.

BTW Plotly.kt works very nicely with Kotlin notebooks, so thanks for making this possible.

@altavir
Copy link
Member

altavir commented Feb 26, 2021

@jbaron thanks. Some updates are coming in this regard as soon as I have time to publish them :)

@jbaron
Copy link
Author

jbaron commented Feb 26, 2021

Just tested it (just a few minor changes to my docker build) and indeed it works fine with the latest kernel from the jetbrains-dev channel. So will close this ticket.

And I'm looking forward to the future versions of Plotly.kt.

@jbaron jbaron closed this as completed Feb 26, 2021
@pvegh
Copy link

pvegh commented May 30, 2021

new jupyter seems to have been released, any update on this?

@altavir
Copy link
Member

altavir commented May 30, 2021

@pvegh Do you have any problems with the latest version? It does require JDK 11, but otherwise seems to work out of the box.

@pvegh
Copy link

pvegh commented May 30, 2021

@pvegh Do you have any problems with the latest version? It does require JDK 11, but otherwise seems to work out of the box.

It works, but IntelliJ shows the same error as above:
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
Also strange that it shows as red/error but still compiles and works just fine.

@altavir
Copy link
Member

altavir commented May 30, 2021

The problem is with your IDEA configuration, for some reason idea itself and gradle use different JDK versions.

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

No branches or pull requests

3 participants