0

In a Scala notebook on IBM DSX, I did a %AddJar to add a jar to my Scala notebook, but that turned out to be the bad one, so had to fix that jar.

However when I re-try the %AddJar it says 'Using cached version of xxx.jar' How do I force to discard the old cached one and ensure the new jar gets added via %AddJar.

Cannot seem to find an equivalent %RemoveJar. Also, wondering what is the location of these 'cached' jar files, so I can manually delete it to force re-loading of the jar.

Thanks,

Rajesh

RajeshK
  • 36
  • 1

1 Answers1

1

Restart the kernel of your notebook. The effects of %AddJar are temporary, so the newly started kernel will not have any of the previously added jars loaded.

You cannot unload jars once they are loaded, and changing the filesystem does not trigger a reload. The only case where you'd have to change something in the filesystem is if you would upload a different jar with the same name. %AddJar keeps a cache, so it uses the old JAR if it came from the exact same URL. The correct way to address this case is to put a version number in your JAR file name and/or download URL.

The cached jars are in directory ~/downloads/. The full path is in the environment variable JAR_DIR.

Roland Weber
  • 1,865
  • 2
  • 17
  • 27