This project implememts a BeanShell kernel for Jupyter Notebokks based on the Juptyer JVM BaseKernel project by Spencer Park. The project is a simple wrapper to start a Beanshell interpreter using the JSR223 script engine factory, and then call eval() to do all of the work.
-
Adjust dependency versions and repository locations as required.
-
Compile with gradlew:
gradlew clean jar
-
Copy the resulting
beanshell_kernel-1.0.0.jar
file to a reliable location, for example to /home/me/jupyter_beanshell. -
Create a kernel.json specification file similar to the following:
{
"argv": ["java",
"-classpath",
"/home/me/jupyter_beanshell/beanshell_kernel-1.0.0.jar",
"ca.spatial.jupyter.IBeanshell",
"{connection_file}"],
"display_name": "BeanShell",
"language": "beanshell"
}
For example, create this file as /home/me/jupyter_beanshell/kernel.json
- Install the kernel in the usual way by specifying the name of the folder that contains the kernel.json file:
jupyter kernelspec install /home/me/jupyter_beanshell
- Start the notebook application, and select the "BeanShell" kernel.