Can I change the console in Eclipse?

2

My question is if you can use the console of the operating system (eg, the "cmd" of Windows, or "terminal" in Linux) to see the outputs of the programs in Eclipse, instead of the console provided by Eclipse.

Thank you very much

    
asked by Augusto Herbel 04.04.2016 в 09:23
source

1 answer

1

What you can do is configure an external launcher for cmd or terminal, for this:

  • Go to run-> External Tools -> External Tools Configurations
  • Once there, you create a new program and fill in the information requested

Here is a more detailed tutorial.

link

PUBLISHED WITH USEFUL ANSWER

@AugustoHerbel also, if what you want is to show the results by opening the console, you could do it with code, here is a small example:

public static void main(String[] args) { 
  try { 
    int a = 3, b = 2, suma = 0; 
    suma = a+b; 
    Runtime rt = Runtime.getRuntime(); 
    rt.exec("cmd.exe /c start echo suma: "+suma); 
  } catch (IOException e) { 
    // TODO Auto-generated catch block 
    e.printStackTrace(); 
  } 
}
    
answered by 04.04.2016 / 15:09
source