1 / 30

Comp 401 Eclipse Setup

Detailed setup guide for Eclipse, including workspace folders setup, downloading Eclipse, and configuring projects. Detailed instructions provided for Windows and Mac users.

cyrj
Download Presentation

Comp 401 Eclipse Setup

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Comp 401Eclipse Setup Instructor: Robert Mills. John Hansen

  2. Eclipse – One Time Setup • Separate folder setup instructions for Windows and Mac users • Once we get to using Eclipse, instructions are the same • If you run into a problem with any of these steps, please contact us and we will help you with setup.

  3. Windows Users – Setting up the Workspace Folders • Open “My Computer” • Click on “Start” and then “My Computer” • Open your “C:” drive • Create a new folder called “comp401workspace” • Do not include the quotes in the name • Open the “comp401workspace” folder • Do not include the quotes in the name • Open the “comp401workspace” folder • Leave the window showing the folder contents open

  4. Windows Users – Setting up the Workspace Folders • From the recitation page of the course website, download Eclipse and the ObjectEditor package onto your desktop • 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 the you 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. Windows Users – Starting Eclipse • Unzip your Eclipse, go to its extracted folder, and create a shortcut of the file “eclipse.exe” onto your desktop • Double-click on the Eclipse shortcut on your desktop

  6. Mac Users – Setting up the Workspace Folders • Open your “Documents” folder • Create a new folder called “comp401workspace” • Do not include the quotes in the name • Open “comp401workspace” • Do not include the quotes in the name • Open the “comp401workspace” folder

  7. Mac Users – Setting up the Workspace Folders • From the recitation page of the course website, download Eclipse and the ObjectEditor package onto your desktop • 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. Mac Users – Starting Eclipse • Open your “Applications” folder • Open the “eclipse” folder • Double-click on eclipse.exe

  9. Setting up the Eclipse Workspace • From this point on, the instructions are the same for Windows and Mac users

  10. Setting up the Eclipse Workspace • When you first start Eclipse, you may see the Workspace launcher screen • If you do, click OK

  11. Setting up the Eclipse Workspace • 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. Setting up the Eclipse Workspace • You should now see something like this

  13. Setting up the Eclipse Workspace • If you already gotten some other workspace opened, you can switch between workspaces by clicking on “File” then “Switch Workspace” then “your target workspace”

  14. Setting up the comp401 Project • Create a new Java Project by clicking on “File” then “New” and then “Java Project”

  15. Setting up the comp401 Project • Select the “Create new project in workspace” • Click Next

  16. Setting up the comp401 Project • Click on “Libraries” • You should see something like this • In particular JRE System Library should be in the list • Click on “Add External JARs…”

  17. Setting up the comp401 Project • Browse to the “comp401workspace” folder you created • Double-click on oeall13.jar • You should see something like this • oeall13.jar should be in the list • Click on Finish at the bottom of the window

  18. Setting up the comp401 Project • You should see something like this

  19. Create A JAVA Package • On the tool bar, select “File->New->Package” or click the “New Java Package” icon, create a package called comp401pkg

  20. Adding a New Class • Right-click on “comp401pkg” then “New” and then “Class”

  21. Adding a New Class • Call the class “ASafeArgPrinter” • Do not change any other settings or enter other information • Click Finish at the bottom of the window

  22. Adding a New Class • You should see something like this • Eclipse has already made the class header for you • You can now write the class body in the edit window

  23. Running ASafeArgPrinter from Eclipse • Right-click on “ASafeArgPrinter.java” then “Run As…” and then “Java Application”(or Ctrl+F11) • Make sure you have finished the main method before running it.

  24. Specify Arguments to Your Program (Review) • Right click on your Java file -> Run As -> Run Configurations -> Arguments

  25. Compiling in Eclipse • 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

  26. Debug Your Programs (1) Debug Perspective (F11) Switch Views

  27. Debug Your Programs (2) Check this box.

  28. Debug Your Programs (3) Step Into(F5) & Step Over(F6) Watch Set breakpoints on the side bar Code

  29. Eclipse and You • You have successfully setup Eclipse for all the programming we will do in our course • 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 me

  30. Screen Captures • Select the window you want to capture. • Press Alt + PrntScr (Windows) or Command + Shift + 4, then Spacebar (Mac) • An image of the screen is in your copy buffer • Paste into document for your assignment.

More Related