Java 9 repl for running applications
Java 9 introduced repl. Exe called jshell in the JDK distribution Is there any way to connect to the jshell of the JDK running some applications and execute the command referring to the running application For example, execute some methods to form application code, check objects, etc?
Solution
Jshell is not a standard Java command, it is another command Once the shell is opened, it "goes to" in read Eval print loop After typing the command, the shell will read and parse it, evaluate it and print the results
You can define variables and add classes to the classpath, but I don't think it's possible to start an application or server from there, at least not at this stage and not in the same JVM You can add classes to instantiate them, but you have no option to check their variables However, you can see the instantiated variables in the scope of jshell (for the objects you create, you can only access and print their public methods and variables)
It seems that jshell will have an API, which opens the way for other possibilities