To Create a New Project in Eclipse

To Create a New Project in Eclipse

<p>To work on a new assignment in Eclipse you will need to create a new project, add the necessary class files, test your solution, then create a jar file and submit.</p><p>WARNING: This should only be done after your planning document has been completed. Do not start programming without a plan.</p><p>To create a new project in Eclipse:</p><p>1. Under “file”, hit “New” 2. Hit “Project”, then select “Java Project” and hit Next 3. Enter a project name. Avoid spaces as this will create a new directory. 4. Hit “Finish”</p><p>To add a new class: 1. Click on the project in the “package explorer” window 2. Under “file”, hit “New”, then “Class” 3. Ensure that the source folder is correct for your project and package is left blank 4. Enter the name of the new class and click “Finish” 5. Enter your code.</p><p>To test your project: 1. Make sure the class containing the main method is selected in the editor window 2. Under “Run”, select “Run As”, then “Java Application” 3. Your project will build and run 4. Once you’ve fully tested your assignment, create a .jar file and submit</p><p>To debug your project: 1. In the margin at the far left of the editing window, double click to set a breakpoint 2. Breakpoints can be removed by double clicking again 3. Breakpoint properties can be modified by right clicking on a breakpoint 4. Once all breakpoints are set, click “Run”, select “Debug As”, then “Java Application” 5. If asked to change to a “Debug Perspective”, hit “Yes” 6. Use the debug buttons to step through your code</p><p>To create a .jar file: 1. Under “file”, hit “Export” 2. hit “JAR File”, then Next 3. Double click on the project name in the “resources to export” window 4. Check that project name. This should also check the boxes in the window on the right- hand side. 5. In the box labeled “Jar File: “, type the name of the file with a .jar extension (e.g. minor2.jar) 6. Keep hitting next until you see a box labeled “Main Class” at the bottom. Browse for the class containing the main method. 7. Hit finish 8. Find and test your jar file (click on it and see that it runs)</p><p>To submit your project: 1. In Moodle, click on the assignment 2. Browse for the files to submit and click the “Upload this file” button 3. Repeat to submit all files required (typically .doc, .jar, and .java files) 4. Check back later for grades/response files</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us