Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import java.util.Scanner;
- public class Main
- {
- public static void main(String[] args)
- {
- Scanner scan = new Scanner(System.in);
- System.out.println("Il tuo nome?");
- String nome = scan.nextLine();
- String saluta = String.format("echo \"Ciao %s! Come stai?\"", nome);
- String colore = "color 0b";
- String info = "chdir";
- String cmd = "cmd.exe /c start " + saluta;
- try
- {
- Runtime run = Runtime.getRuntime();
- run.exec(cmd);
- run.exec("colore.bat");
- System.out.println("\n>>> PROMPT <<<");
- System.out.println("\nCmd > " + saluta);
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- System.out.printf("\n %s", cmd);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment