Using Java as the Linux Shell Scripting Language?

I used the C / TC shell before instead of turning to python

Now I want to integrate all shell scripts, GUIs, databases and web pages Python performs well in most jobs, but it is relatively weak in Gui, general performance and third-party libraries

So I will try Java as my main development language Is it good at shell interactive programming, process control and so on?

Thank you.

Solution

Java itself may not be the best shell language because of slow startup time and lack of built-in libraries, commands and files used with the operating system (I mean, there is no way to create two input and output streams and manage data with Java copy files without help, alas!)

However! There are many JVM based languages, such as jruby (Ruby), Rhino (JavaScript), Jython (Python), groovy or grass, bean shell, etc. they work like shell language and can run programs written in other Java I suggest you look at grash, which may be exactly what you need

Some of these languages can even preload the JVM runtime to speed up startup time (for example, nailgun of jruby), which can solve the problem of slow startup time See also this post to use Ruby (jruby) as the shell language

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>