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 termi开发者_高级运维nal window. I want it to go onto a new terminal window. in ubuntu
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
.
On windows:
cmd /c "java myprog"
should do what you want.
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.
精彩评论