Open david-romano opened 8 months ago
(Editing my earlier answer)
The source of default imports is this file: https://github.com/SpencerPark/IJava/blob/master/src/main/resources/ijava-jshell-init.jshell , which is loaded unconditionally on kernel startup. So the only way to get rid of it is to create a custom kernel build. Should probably make it conditional in JJava.
We may actually be working on this as a part of another feature in JJava: https://github.com/dflib/jjava/issues/28
Context: I'm using IJava to teach Java via Google Colab Jupyter notebooks, and I just realized that no import statements are necessary for, say, access to the contents of the
java.io
package. I'd like to mimic the environment students will encounter when they start using an IDE, where the default is often that only the contents of thejava.lang
package are available without import. Is this something I could easily mimic with IJava?Thanks, David Romano