How to open a command terminal in Linux?

后端 未结 8 2172
情歌与酒
情歌与酒 2020-11-30 09:45

I want to open the terminal (command prompt) on a Linux machine using Java code. I know how to open command prompt in windows.The following code i have used in windows

8条回答
  •  臣服心动
    2020-11-30 09:58

    I would definitely provide an easy way to configure the path to the desired terminal in a place that can be easily edited. For example maybe in a configuration XML file.

    Different distros will keep this in different places, so it's probably best to check the per distribution documentation for the platforms you're targeting (and to document how to change it).

    "/usr/bin/xterm" should be on most machines, but I wouldn't necessarily bet the farm on it.

提交回复
热议问题