使用 Jupyter Notebook for Java

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40917409/
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 23:00:06  来源:igfitidea点击:

Using Jupyter notebook for Java

javajupyter-notebook

提问by Bendik

I've used the Jupyter notebook quite a lot for my Python projects, but now I have to work on something in Java. So I was wondering if I could get Jupyter to work with Java?

我在 Python 项目中经常使用 Jupyter notebook,但现在我必须用 Java 处理一些事情。所以我想知道我是否可以让 Jupyter 与 Java 一起工作?

After some searching I think I understand that you can install different kernels for other languages, with a list of kernels here.But I don't see one for Java there. The reason I think there is a working solution is this notebook, showing of a Java 9 notebook. Does anyone know how to set this up?

经过一番搜索,我想我明白您可以为其他语言安装不同的内核,并在此处提供内核列表但我在那里没有看到 Java 的一个。我认为有一个可行的解决方案的原因是这个 notebook,展示了一个 Java 9 notebook。有谁知道如何设置?

I'm on macOS Sierra if it matters.

如果重要的话,我在 macOS Sierra 上。

回答by user3194131

In the list of kernels, there is also a Scala kernel, which is based on Java.

在内核列表中,还有一个基于 Java 的 Scala 内核。

回答by Nate Stone

While doing a similar search, I found an option that may meed your needs:

在进行类似搜索时,我发现了一个可能满足您需求的选项:

SciJava Jupyter Kernel https://github.com/scijava/scijava-jupyter-kernel

SciJava Jupyter 内核 https://github.com/scijava/scijava-jupyter-kernel

I have not actually run Java against this kernel yet, but it's documentation claims to support Java among a number of other scripting languages.

我实际上还没有针对这个内核运行 Java,但它的文档声称在许多其他脚本语言中支持 Java。

It is constructed to run ImageJ ("an open source Java image processing program"): https://imagej.net/Scripting#Supported_languages

它被构建为运行 ImageJ(“一个开源 Java 图像处理程序”):https: //imagej.net/Scripting#Supported_languages

Jupyter Kernels List (reference): https://github.com/jupyter/jupyter/wiki/Jupyter-kernels

Jupyter 内核列表(参考):https: //github.com/jupyter/jupyter/wiki/Jupyter-kernels

回答by MohsenIT

You can use Zeppelinnotebook instead. Apache Zeppelin is build on the JVM.

您可以改用Zeppelin笔记本。Apache Zeppelin 构建在 JVM 上。

回答by Seshadri R

IJava available at https://github.com/SpencerPark/IJavarequires JDK 9. The build process for my iMac (MacOS 10.13.5) worked like a charm and within 10 minutes, I could start programming interactively in Java within Jupyter.

https://github.com/SpencerPark/IJava 上可用的 IJava需要 JDK 9。我的 iMac (MacOS 10.13.5) 的构建过程就像一个魅力,在 10 分钟内,我可以开始在 Jupyter 中使用 Java 进行交互式编程。