I know that this subject have been asked many several times here. but i didn't find any clearly answer.
I want to execute linux shell on linux commands from windows using java.
I have two options:
To execute the commands remotely.
To create a service on the linux and call him from windows.
which one is prefered and what is the best way to implement it?