I'm learning to use spring framework and I can't seem to find a tool similar to Django shell_plus. I'd like to be in a java repl in which I have access to all my classes, dependencies and etc. I've googled and found j-shell and spring-shell but spring-shell doesn't seem to satisfy my needs since I need to be able to instantiate and play around with my classes, so I went with j-shell. my only problem is I don't know how to let j-shell know where my classes are. I've tried
$ jshell --classpath "~/Desktop/path/to/project/"
my project directory being:
Project
|
+-- build.gradle
|
+-- build
| |
| +-- libs and etc...
+-- src
| |
| +-- main
| |
| +-- java
| |
| com
| |
| +-- MyClass.java
| |
| +-- MyOtherClass.java
|
+-- settings.gradle
+-- gradlew
+-- default.nix
but when in j-shell I don't have access to spring framework or my classes. I'm using emacs on nixos if that matters and nix for dev environment dependencies. appreciate any kind of help, thanks.
i've also tried setting the classpath to the jars located in ~/home/.gradle/
I expect to be in jshell repl with access to springframework classes and ones i've coded myself.