IJava icon indicating copy to clipboard operation
IJava copied to clipboard

Can't use magics in startup scripts

Open SpencerPark opened this issue 5 years ago • 1 comments

As mentioned in #61, magics are not transformed before evaluating startup scripts which makes adding dependencies in those places much more awkward.

The kernel should transform such scripts before evaluating.

SpencerPark avatar May 29 '19 14:05 SpencerPark

just use magic method directly

String[] mavenDependencies = {
    "net.sourceforge.plantuml:plantuml:8059"
};
getKernelInstance().getMavenResolver().addMavenDependencies(Arrays.asList(mavenDependencies));

see my IJAVA_STARTUP_SCRIPTS for plantuml magic ! https://github.com/jimmybow/docker-java-notebook/blob/master/data/jupyter/custom_IJava/custom.jshell

jimmybow avatar Sep 07 '23 11:09 jimmybow