How to execute native shell commands from Java Program? Example
How to execute native shell commands from JAVA
Though it’s not recommended some time it’s become necessary to execute a native operating system or shell command from Java, especially if you are doing some kind of reporting or monitoring stuff and required information can easily be found using the native command. This is not advised though because then you will lose platform independence which is why we mostly used Java.
Anyway, if you have no choice and you want to execute native commands from JAVA then it's good to know that how we can do it, many of you probably know this but for those who don't know and have never done it, we will see through an example.
Though it’s not recommended some time it’s become necessary to execute a native operating system or shell command from Java, especially if you are doing some kind of reporting or monitoring stuff and required information can easily be found using the native command. This is not advised though because then you will lose platform independence which is why we mostly used Java.
Anyway, if you have no choice and you want to execute native commands from JAVA then it's good to know that how we can do it, many of you probably know this but for those who don't know and have never done it, we will see through an example.
تعليقات
إرسال تعليق