Presentation is loading. Please wait.

Presentation is loading. Please wait.

C OMP 401 E CLIPSE S ETUP Graduate TA’s: Wade Gobel, Ben Newton.

Similar presentations


Presentation on theme: "C OMP 401 E CLIPSE S ETUP Graduate TA’s: Wade Gobel, Ben Newton."— Presentation transcript:

1 C OMP 401 E CLIPSE S ETUP Graduate TA’s: Wade Gobel, Ben Newton

2 2 E CLIPSE – O NE T IME S ETUP Mac and Windows have separate setup instructions Once we begin using Eclipse, instructions are the same Ask TA’s for help with any problems you encounter.

3 3 W INDOWS U SERS – S ETTING UP THE W ORKSPACE F OLDERS Open “My Computer” Click on “Start” and then “Computer” Open your “C:” drive Create a new folder called “comp401workspace” Do not include the quotes in the name Open the “comp401workspace” folder Leave the window showing the folder contents open

4 4 W INDOWS U SERS – S ETTING UP THE W ORKSPACE F OLDERS From the recitation page of the course website, download Java and Eclipse onto your desktoprecitation page For all the files, you must right-click and then choose the “Save link as…” or “Save target as…” option If you are using Internet Explorer Save the file to your desktop by clicking on the desktop icon on the left-hand-side of the Save window If you are using Mozilla Firefox Download the files to your desktop Drag the files you save from the desktop to the “comp401workspace” folder you opened up earlier

5 5 W INDOWS U SERS – S TARTING E CLIPSE Unzip your downloaded Eclipse file, go to its extracted folder, and create a shortcut of the file “eclipse.exe” onto your desktop Right-click on eclipse.exe and choose Send to -> Desktop Double-click on the Eclipse shortcut on your desktop

6 6 M AC U SERS – S ETTING UP THE W ORKSPACE F OLDERS Open your “Documents” folder Create a new folder called “comp401workspace” Do not include the quotes in the name Open “comp401workspace” folder Leave the window showing the folder contents open

7 7 M AC U SERS – S ETTING UP THE W ORKSPACE F OLDERS From the recitation page of the course website, download Java and Eclipse onto your desktoprecitation page For all the files, you must right-click and then choose the “Save link as…” or “Save target as…” option If you are using Safari or Mozilla Firefox Download the files to your desktop Drag the files you save from the desktop to the “comp401workspace” folder you opened up earlier

8 8 M AC U SERS – S TARTING E CLIPSE Open your “Applications” folder Open the “eclipse” folder Double-click on eclipse.exe

9 9 S ETTING UP THE E CLIPSE W ORKSPACE From this point on, the instructions are the same for Windows and Mac users

10 10 S ETTING UP THE E CLIPSE W ORKSPACE When you first start Eclipse, you may see the Workspace launcher screen Browse to the comp401workspace you created Click OK

11 11 S ETTING UP THE E CLIPSE W ORKSPACE When you first start Eclipse, you may see the Startup tab If you do, you can close it using the “x” button for the tab

12 12 S ETTING UP THE E CLIPSE W ORKSPACE You should now see something like this

13 13 S ETTING UP THE E CLIPSE W ORKSPACE If you already have some other workspace open, you can switch between workspaces by clicking on “File” then “Switch Workspace” then “your target workspace”

14 14 S ETTING UP THE COMP 401 P ROJECT Create a new Java Project by clicking on “File” then “New” and then “Java Project”

15 15 S ETTING UP THE COMP 401 P ROJECT Enter the project name as “Factorial” Click Finish

16 16 S ETTING UP THE COMP 401 P ROJECT You should see something like this (with “Factorial” instead of “comp401”)

17 17 C REATE A JAVA P ACKAGE On the tool bar, select “File->New->Package” or click the “New Java Package” icon, create a package called comp401pkg

18 18 A DDING A N EW C LASS Right-click on “comp401pkg” then “New” and then “Class”

19 19 A DDING A N EW C LASS Call the class “Factorial” Do not change any other settings or enter other information Click Finish at the bottom of the window

20 20 A DDING A N EW C LASS You should see something like this (your project name and class names will be different) Eclipse has already made the class header for you You can now write the class body in the edit window

21 21 R UNNING AS AFE A RG P RINTER FROM E CLIPSE Right-click on “Factorial.java” then “Run As…” and then “Java Application”(or Ctrl+F11) Make sure you have finished the main method before running it.

22 22 S PECIFY A RGUMENTS TO Y OUR P ROGRAM (R EVIEW ) Right click on your Java file -> Run As -> Run Configurations -> Arguments

23 23 C OMPILING IN E CLIPSE By default, Eclipse auto-compiles for you so you never have to To turn auto-compile on or off, click on “Project” and then check or uncheck the “Build Automatically” option If it is checked, then auto-compile is on

24 24 D EBUG Y OUR P ROGRAMS (1) Debug Perspective (F11) Switch Views

25 25 D EBUG Y OUR P ROGRAMS (2) Check this box. Add a breakpoint by right-clicking in the left ruler area, and select “Toggle breakpoint” Start debug

26 26 D EBUG Y OUR P ROGRAMS (3) Watch Code Set breakpoints on the side bar Step Into(F5) & Step Over(F6)

27 27 E CLIPSE AND Y OU You have successfully setup Eclipse Later we will install the ObjectEditor package needed for this class Feel free to explore Eclipse and use it for your assignments from now on If you have any questions or problems about Eclipse, feel free to ask the TA’s

28 28 S CREEN C APTURES Select the window you want to capture. Press Alt-Print Screen (Windows) or Command + Shift + 4, then Spacebar (Mac) An image of the screen is in your copy buffer Paste into document for your assignment.


Download ppt "C OMP 401 E CLIPSE S ETUP Graduate TA’s: Wade Gobel, Ben Newton."

Similar presentations


Ads by Google