0

Sometimes, the console in Eclipse just isn't enough, or my program has to be run in a terminal of some sort. How would I achieve this?

I'm using Eclipse Mars 4.5.0 on a MacBook.

Edit: I know how to run Java programs from a terminal, but what I want is Eclipse to do this automatically when I press the run button.

Loovjo
  • 534
  • 8
  • 23
  • 1
    [How to run Java programs from the terminal?](http://stackoverflow.com/questions/7598171/how-to-run-java-programs-from-the-terminal) ? – Perdomoff Dec 07 '15 at 18:16
  • @Perdomoff That is an entirely different question, that one is about why eclipse doesn't find the jarfile or something, this one is about how to make eclipse run the program in the terminal by default. Sorry if it's unclear. – Loovjo Dec 07 '15 at 18:18
  • 1
    just click run... it runs stuff in its own terminal. – user1231232141214124 Dec 07 '15 at 18:55
  • It is possible and already answered [here](http://stackoverflow.com/questions/2571222/eclipse-plugin-that-opens-a-command-line-in-eclipse) and [here](http://stackoverflow.com/questions/8689991/how-do-i-get-to-the-command-line-in-eclipse) There is one more [link]http://idiotechie.com/how-to-use-cmd-prompt-inside-eclipse/ – Nimble Fungus Dec 07 '15 at 19:21

1 Answers1

0

Making Eclipse do it for you isn't possible

To do it manually:

First, go to the directory with your *.java file. To go to the directory, use the cd command. Then, run javac yourfile.java. Lastly, java yourfile

intboolstring
  • 6,891
  • 5
  • 30
  • 44