Since no one else answered, I'll answer myself. I used Gyro Gearless's idea from the comments above. I installed Jython and it worked very well as a REPL to test out my Java classes.
Is there some sort of Java REPL/shell that I can use to quickly test class files?
-
16-06-2023 - |
Question
I need a Java REPL/shell to quickly test some class files. Since they are mostly throwaway code, I don't want to have to bother writing full-blown unit tests. And writing a Main class is also too much extra work for some quick testing.
Solution
OTHER TIPS
Just stumbled here.
As mentioned in Mathias Begert's comment, there is an on-line Java REPL at http://www.javarepl.com/console.html and the sources are available from GitHub https://github.com/albertlatacz/java-repl
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow