user602774
user602774

Reputation: 1103

java program in new terminal ubuntu

how can i start a java program in a new terminal window ?

when i say

java myprog

it starts on the same terminal window. I want it to go onto a new terminal window. in ubuntu

Upvotes: 1

Views: 697

Answers (3)

superfav
superfav

Reputation: 1061

Assuming you use xterm as your terminal program

xterm -e java myprog

should do the trick. Or

gnome-terminal -e "java myprog"

with gnome-terminal.

Upvotes: 2

esaj
esaj

Reputation: 16035

The command to open a new terminal window depends on what desktop you use (gnome, KDE, XFCE...). For gnome (Ubuntu) the command is gnome-terminal, for KDE (Kubuntu) konsole (I think...). xterm should work also on most distributions.

Upvotes: 0

proactif
proactif

Reputation: 11761

On windows:

cmd /c "java myprog"

should do what you want.

Upvotes: 1

Related Questions