SlideServe
Menu
Préférences
© SlideServe · v2026

Some Tips for Using Eclipse

yuval avatar
22 diapositives · 435 Views · Jul 22, 2014

Creating and running a Java program. Some Tips for Using Eclipse. Create a New Java Project. Create new Java Project. File/New/Java Project. Create New Project – Give it a name. Name the project. Add a class to the project. Right-click on src . Select New/Class. New project is open.

Some Tips for Using Eclipse - slide 1
01 / 22Some Tips for Using Eclipse
1 / 17

Télécharger la présentation

Some Tips for Using Eclipse
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Creating and running a Java program Some Tips for Using Eclipse

  2. Create a New Java Project Create new Java Project File/New/Java Project

  3. Create New Project – Give it a name Name the project

  4. Add a class to the project Right-click on src. Select New/Class New project is open

  5. Adding a new Driver Class Give the class a name If this is the driver class, add a main method Make sure this is checked Click Finish

  6. Generated code Fill in class purpose Fill in method description Fill in body of main method

  7. Add Another Non-Driver class • Use same technique; do not add a main method Class name

  8. Add desired attributes

  9. Generate Default Constructor Deselect All to Generate Default Constructor Select both Select me

  10. Default Constructor Fill in the Description Fill in the body of the default constructor

  11. Generate Parameterized Constructor • Follow the same process but do NOT deselect the attributes (fields) • All of the following code is generated

  12. Generate Getters and Setters Choose those you want Remember it is not always desirable to have getters and setters – depends on what needs to remain private Select me

  13. Added Getters/Setters Depending on which are selected in the previous dialog, a series of getters and setters like this is generated

  14. Other code generators Comment out (or uncomment) the selectedlines of code Add a block of comments to a method you have written Generate a toString method for your class

  15. Renaming an attribute or method • Use Refactor / Rename to change the name of a method or attribute of a class, a localvariable, parameter, or even the name of a class. • This changes the name everywhere it appears in the code.

  16. Running a program Right-click on (or in) the driver (code) To run a program

  17. Another way to run the program … Click me

  18. Submitting a project … from your workspace

  19. Project Folder Contents in Workspace Contains .java files for your project Contains the compiled .class files

  20. The bin folder This folder contains the compiled .class files. Do not submit them.

  21. The src Folder .java files for the project Zip ONLY these files, naming the zipped folder appropriately. DO NOTzip the containing folder (src or DemoProject1) If you are using a non-Windows machine such as a Mac or a Linux machine, it is your responsibility to be sure your system does NOT add extraneous folders and other items to your zipped folder.

  22. Zipping the files Select the files to be zipped and right-click … some other archiving tool such as 7-zip Use SendTo Compressed Folder or …