Jupyter 的 Java 内核

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33972860/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 15:12:22  来源:igfitidea点击:

Java kernel for Jupyter

javajupyter

提问by leo

Is there a java kernel for "Jupyter"? I'm using Mac OS El Capitan.

“Jupyter”是否有Java内核?我正在使用 Mac OS El Capitan。

I tried https://github.com/Bachmann1234/java9_kernelbut to no avail.

我试过https://github.com/Bachmann1234/java9_kernel但无济于事。

回答by Aleksandar Savkov

I know this is a shameless plug, but I think it's important to actually state that at this point there is no Java kernel for Jupyter. You can see the list of available kernels herein case you think that might have changed when you are reading this.

我知道这是一个无耻的插件,但我认为重要的是要实际声明此时Jupyter 没有 Java 内核。您可以在此处查看可用内核列表,以防您在阅读本文时认为可能已更改。

===== update =====

======更新====

There is now a new solution that may be relevant here called IJava.

现在有一个新的解决方案可能与此处相关,称为IJava

回答by JeremyDouglass

There are a number of options, many listed on the official Jupyter kernel list:

有很多选项,很多都列在官方 Jupyter内核列表中

  1. The scijava-jupyter-kernelsupports Java for Jupyter

    scijava-jupyter-kernel aims to be a polyglot Jupyter kernel. It uses the Scijava scripting languages to execute the code in Jupyter client and it's possible to use different languages in the same notebook. Some of the supported languages are Groovy (default), Python, Beanshell, Clojure, Java, Javascript, Ruby and Scala. The kernel has been originally created to work with ImageJ. See here for more details. Under the hood scijava-jupyter-kernel uses the Beaker base kernel.

  2. BeakerXextensions for Jupyter come with Java cell support.

    BeakerX contains and depends on many projects including: The kernel is originally derived from lappsgrid, but has been rewritten in Java and refactored and expanded. The Java support uses Adrian Witas' org.abstractmeta.toolbox.

  1. scijava-jupyter内核支持Java的Jupyter

    scijava-jupyter-kernel 旨在成为一个多语言的 Jupyter 内核。它使用 Scijava 脚本语言在 Jupyter 客户端中执行代码,并且可以在同一笔记本中使用不同的语言。一些支持的语言是 Groovy(默认)、Python、Beanshell、Clojure、Java、Javascript、Ruby 和 Scala。内核最初是为与 ImageJ 一起使用而创建的。请参阅此处了解更多详情。在引擎盖下 scijava-jupyter-kernel 使用 Beaker 基础内核。

  2. Jupyter 的 BeakerX扩展带有Java 单元支持

    BeakerX 包含并依赖于许多项目,包括: 内核最初源自 lappsgrid,但已用 Java 重写并重构和扩展。Java 支持使用 Adrian Witas 的 org.abstractmeta.toolbox。

Updated:

更新

  1. IJava, a Jupyter kernel for executing Java code.

    The kernel executes code via the new JShell tool. Some of the additional commands should be supported in the future via a syntax similar to the ipython magics. The kernel is fully functional. [...] If you are interested in building your own kernel that runs on the JVM check out the related project that this kernel is build on, jupyter-jvm-basekernel.

  1. IJava,用于执行 Java 代码的 Jupyter 内核。

    内核通过新的 JShell 工具执行代码。将来应该通过类似于 ipython magics 的语法支持一些附加命令。内核功能齐全。[...] 如果您有兴趣构建自己的在 JVM 上运行的内核,请查看构建此内核的相关项目jupyter-jvm-basekernel

You may also be interested in:

您也可能对。。。有兴趣:

  1. Kotlin kernel for IPython/Jupyter, a basic kotlin REPL kernel.
  1. 用于 IPython/Jupyter 的 Kotlin 内核,一个基本的 kotlin REPL 内核。

回答by Debashish

Try IJavakernel for Jupyter. This Kernel works only with Java 9 or above. I have using this for some time now with Java 10 on windows. It is working fine, have not noticed any issues so far.

为 Jupyter尝试IJava内核。此内核仅适用于 Java 9 或更高版本。我在 Windows 上使用 Java 10 已经有一段时间了。它工作正常,到目前为止还没有发现任何问题。

However if you have scijava-jupyter-kernel, IJava karnel will fail to start. As scijava-jupyter-kernel is dependent on OpenJdk 8. And IJava is compiled with JDK9.

但是,如果您有scijava-jupyter-kernel,则 IJava karnel 将无法启动。由于 scijava-jupyter-kernel 依赖于 OpenJdk 8。而 IJava 是用 JDK9 编译的。

回答by Anderson Oliveira

Here, you can see all the available kernels to Jupyter and goes to download page:

在这里,您可以看到 Jupyter 的所有可用内核并转到下载页面:

https://github.com/jupyter/jupyter/wiki/Jupyter-kernels

https://github.com/jupyter/jupyter/wiki/Jupyter-kernels

I'm using Linux Fedora 64bit. For Java kernel to Jupyter, I have successfully installed that one without using Anaconda (plz read the readme file carefully):

我正在使用 Linux Fedora 64 位。对于 Jupyter 的 Java 内核,我已经成功安装了该内核而不使用 Anaconda(请仔细阅读自述文件):

https://github.com/SpencerPark/IJava

https://github.com/SpencerPark/IJava

To install (Linux command):

安装(Linux 命令):

$ chmod u+x gradlew && ./gradlew installKernel

Alternatively, you can try this one:

或者,你可以试试这个:

https://github.com/SpencerPark/IJava/releases/download/v1.2.0/ijava-1.2.0.zip

https://github.com/SpencerPark/IJava/releases/download/v1.2.0/ijava-1.2.0.zip

and install just with the command-line (in Linux):

并仅使用命令行安装(在 Linux 中):

$ python3 install.py

Hope it help you.

希望对你有帮助。