Linux commands from Java

前端 未结 5 1032
無奈伤痛
無奈伤痛 2020-12-18 04:00

Is it possbile to execute linux commands with java? I am trying to create a web servlet to allow ftp users to change their passwords without ssh login access. I would like t

5条回答
  •  一整个雨季
    2020-12-18 04:39

    Use:

    Runtime.getRuntim().exec("Command");
    

    where Command is the command string you want to execute.

提交回复
热议问题