Running Magic Square
In order to run the Magic Square lab in Eclipse, you need to set up an External
Tool. This set up will let you run the magicSquare.bat file and input the square
data without typing it all in to the console. The batch file uses the DOS command
line operator >. This operator lets the console read in data from a file
as if you were typing it in real time. To configure the external tool, you need
to complete the following steps:
- With Eclipse open choose the Run > External Tools > External Tools...
menu option.
- In the dialog box that opens, click the new button in the bottom left.

- In the "Name:" box, enter the words "Magic Square"
- In the "Location:" box click the "Browse Workspace..."
button.
- In the dialog, locate your Chapter 6 Pt 3 labs, choose the "magicSquare.bat"
file.
- In the "Working Directory" box click the "Browse Workspace..."
button.
- In the dialog, locate and select your Chapter 6 Part 3 Labs folder.
- In the "Arguments:" box, type the follwing text: "SquareTest
magicData.htm".
- Click the "Apply" button.
- Click the "Run" button.
- When testing your program, you will have to go to Run > External Tools
> Magic Square to have it execute.