Git Product home page Git Product logo

Comments (7)

takluyver avatar takluyver commented on August 15, 2024

@dsblank can you help with this?

from notebook.

dsblank avatar dsblank commented on August 15, 2024

Indeed, Calico comes with a Java interpreter. However, this is not just a regular system, and might not be what you want (a generic, standard Java system). This Java interpreter is written in Java, but run by .NET/Mono, to integrate with the rest of Calico.

You will need to install Calico for Mac, Windows, or Linux here:
http://calicoproject.org/Calico_Download

Then, you need to make a kernelspec for Java:
./calico --create-kernelspec --display-name="Calico Java" --nographics --lang=java --only

That will make the calico_java kernelspec. You can then use it from console/qtconsole, or the notebook:

$ ipython console --kernel calico_java
Loading Calico version 4.0.0...
IPython Console 3.1.0
In [1]: x = 1;
In [2]: System.out.println(x);
1

It uses a special form of Java called DynamicJava... types are optional, but you can't change the type once set.

I do plan on making a more standard Java kernel at some point. Also, you might be interested in Calysto Processing, that converts Java to Javascript.

Followup questions and comments to: https://bitbucket.org/ipre/calico/

Thanks!

from notebook.

liushiqi9 avatar liushiqi9 commented on August 15, 2024

Sorry, I think I didn't explain well about what I mean.
We already add calico into jupyter and we can load the kernel in the notebook web. We can run java program now, Our question is we don't know how to add a java class path to import our .jar files.
Thank you!

from notebook.

rgbkrk avatar rgbkrk commented on August 15, 2024

This highlights a bigger issue to me, which is of setting environment variables. Are kernels launched with the same env as the notebook server?

from notebook.

takluyver avatar takluyver commented on August 15, 2024

The kernelspec can specify extra environment variables for kernels - these are added to a copy of the notebook server environment variables. If you want to do more complex things (like adding directories to $PATH) the kernelspec can point to a script which modifies its environment variables and then starts the actual kernel.

from notebook.

dsblank avatar dsblank commented on August 15, 2024

@liushiqi9 Let's take these questions out of jupyter issue tracker, as this is a specific kernel question. (Briefly, this isn't regular Java, it doesn't sound like you want to integrate with .NET, so this isn't probably what you want. Wait for a real Java kernel.)

from notebook.

rjpg avatar rjpg commented on August 15, 2024

How to add a java class path in jupyter ? to use java with scijava-jupyter-kernel

from notebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.