Here is my code from the jna sample i am try using native code to run cmd command
boolean status = Kernel32.INSTANCE.CreateProcess(
"cmd.exe /c echo here is output",
here is output
You're going to have a much easier time doing this with Apache Commons Exec with the code from How can I capture the output of a command as a String with Commons Exec?
If you need to specifically use JNA for some reason, you can use what @KompjoeFriek posted -- how to get the process output when using jna and CreateProcessW