Java equivalent (or similar) for powershell

I am aware of JMX, however, I would not consider it anywhere nearby or would not be equivalent to PowerShell or some other command line / shell. For example, JMX Beans and JConsole are more like a graphical interface where the user can only perform operations provided that they are accessible directly using the bean. You cannot perform more complex operations such as filter, pipe, etc. Here are a few more command line / shells commands like PowerShell.

Can anyone make any suggestions for creating something more like PowerShell and less like JMX?

What FOSS libraries can help me get there?

+6
source share
3 answers

You can also use Groovy or Scala, both have a shell function. In fact, most dynamic languages ​​for the JVM have a shell interpreter as an interpreter.

0
source

Have you tried Beanshell ?

+7
source

Apache Karaf has a built-in console system that is easy to expand. I don’t know if it can invoke JMX without any work, but I know that it is very easy to add commands to it.

Not as comprehensive as powershell, but it may be good enough to do the job for you.

0
source

Source: https://habr.com/ru/post/888503/


All Articles