Eclipse_IDE_Java_Programming_Style_Guidelines_and_Documentation
Eclipse_IDE_Java_Programming_Style_Guidelines_and_Documentation
1 / 29
Contents I
1 JDK Installation
2 Eclipse download
3 Eclipse IDE
5 Documentation Style
2 / 29
JDK Installation
3 / 29
JDK Installation
4 / 29
JDK Installation
5 / 29
JDK Installation
6 / 29
Eclipse download
In a browser, go to https://www.eclipse.org/downloads/
7 / 29
Eclipse download
8 / 29
Eclipse download
Click on Download.
9 / 29
Eclipse download
10 / 29
Eclipse IDE
Workspace selection
A workspace is the repository for all of the files that make up your
projects and all of your settings.
Step 1: Create your workspace folder under home directory of Ubuntu.
The folder name should be <Your Regd. No>
Example: (1641012001)
Step 2: Open Eclipse, go to File -> Switch Workspace -> Other
Enter (or Browse to) the workspace folder that you created)
12 / 29
Eclipse IDE: Programming Environment Setup
13 / 29
Eclipse IDE: Programming Environment Setup
Eclipse: A First Look: Find the Eclipse shortcut on the desktop and
double-click on it to start Eclipse.
14 / 29
Eclipse IDE: Programming Environment Setup
16 / 29
Eclipse IDE: Creating a new java project
17 / 29
Eclipse IDE: Creating a new java project
Type Lab1 in the Project name box. Then click on the Finish
button at the bottom. This will create the new Lab1 project.
Now you can see a folder called Lab1 listed in the ”Package
Explorer.” This folder represents your new project. Now it is an
empty project.
The blank area in the center is meant for the editor which will
appear when we start editing our program. Note also that the
Lab1 project you just created is listed in the Package Explorer
panel on the left.
18 / 29
Eclipse IDE: Creating a new java project
19 / 29
Eclipse IDE: Create a new Java class
Go to File->New ->Class
20 / 29
Eclipse IDE: Creating a new java class
21 / 29
Eclipse IDE: Create a new Java class
22 / 29
Eclipse IDE: Editing
Edit the program so that it looks exactly as shown below. Then click on
the Save button at the top left of the window to save your program.
23 / 29
Eclipse IDE: Compiling and Running a Program
Now it’s time to run your first program. Note that before running
the program it is necessary to compile it. However, by default,
Eclipse compiles your program after every save. So the program
is already compiled and you can execute it. If you made any Java
syntax mistakes in typing the program, Eclipse will list the errors in
the Problems tab under the editor window. Fix them and save the
program again.
After a short time, the program will start and a new tab labeled
Console will appear in the bottom pane. This is the space where
you will be able to interact with your program.
24 / 29
Eclipse IDE: Compiling and Running a Program
25 / 29
Java Programming Style Guidelines
Comments in the body of a class should use // rather than /* ... */.
This isn’t a requirement but it will make your life easier.
28 / 29
Documentation Style
29 / 29