Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to execute Linux shell command from Java2 app?

0
Posted

How to execute Linux shell command from Java2 app?

0

I believe executing shell commands in a JAVA environment goes against the object oriented principle and would violate various security concerns that JAVA tries to eliminate. It all has to do with the JAVA Virtual Machine pratically sitting on top of the device layer (someone correct me on this) so it bypasses the shell commands which use a completely different device layer interface to access your typical filesystem, hardware, network, etc. Normally JAVA has a class defined for just about anything that you are accustomed to from the command line so maybe if you enlighten us specifically which commands you’re trying use or what you are trying to accomplish we(I) can offer an alternative solution.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123