How to Run Java code in new terminal Through Java Code in Linux
Hi,
Here I have written the snippet for running the java process in new terminal through java code
just put your java code name and run simply.
import java.io.*;
class CodeRunInTerminal
{
public static void main(String args[]) throws IOException
{
String command= "/usr/bin/xterm -e java codename";//where the java is command and codename is java code which you want to run in new terminal.
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(command);
}
}
Thanks.
Here I have written the snippet for running the java process in new terminal through java code
just put your java code name and run simply.
import java.io.*;
class CodeRunInTerminal
{
public static void main(String args[]) throws IOException
{
String command= "/usr/bin/xterm -e java codename";//where the java is command and codename is java code which you want to run in new terminal.
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(command);
}
}
Thanks.
You’d outstanding guidelines there. I did a search about the field and identified that very likely the majority will agree with your web page.
ReplyDeleteKumaun University BCOM 1st Year Result 2020
Kumaun University BCOM 2nd Year Result 2020
Kumaun University BCOM 3rd Year Result 2020