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
There isn't actually a "the" terminal. What you really want is shell. Most Linuxes uses BaSH as a shell, but to keep on the safe side you should restrict yourself to /bin/sh
Edit: Hmm I probably missunderstood the question. If you want an interactive terminal you should look into using a toolkit providing a component for that.
Edit2: Maybe your needs can be served by VTE which is a GTK+ component for embedding a terminal.