venkatesh.mansani@yahoo.
com Naresh i Technologies
Eclipse
Eclipse:
Eclipse is an IDE (Integrated Development Environment).
Eclipse is an IDE for developing applications using Java and other programming
languages like C, C++, Perl, Ruby, Python, .. etc.,
IDE contains editors, compilers, interpreters, debuggers, plug-ins, .. etc.,
Plug-in is a software component that can be used to extend the functionality of
an IDE.
Eclipse was introduced by Eclipse Foundation in 2004.
Eclipse latest version is 4.20 & it was released in June 2021.
Eclipse IDE developed in Java language only.
Eclipse official website is http://www.eclipse.org
There are two eclipse softwares for Java
1) Eclipse IDE for Java Developers
2) Eclipse IDE for Java EE Developers
Eclipse IDE for Java Developers supports Java SE applications where as Eclipse IDE
for Java EE Developers supports Java SE & Java EE applications.
To Download & Install Eclipse IDE:
1) Open Google
2) Type eclipse download
3) Click on http://www.eclipse.org
4) Click on Download x86_64 (or) Click on Download packages
5) Click on Download windows x86_64 (or) Click on download x86_64 under
Eclipse IDE for Enterprise Java and Web Developers.
[email protected] Naresh i Technologies
6) Click on download button.
7) Double click on downloaded file.
8) Click on Eclipse IDE for Enterprise Java and Web Developers.
9) Click on Install button.
10) Click on Accept Now button
To start eclipse:
1) Double click on eclipse icon in eclipse folder
2) Select work space by clicking browse button
Note: Eclipse stores projects in a folder is called a workspace.
3) Click on Launch button
4) Close welcome page
To close perspective:
1) Right click on Java EE perspective icon at top right corner
2) Click on close
To open perspective:
1) Click on window menu => perspective => open perspective = other..
2) Select Java & click on open button
(or)
1) Click on open perspective icon at top right corner
2) Select Java & click on open button
Note: Java EE is a default perspective
A perspective is a layout of views & editors
To write welcome program:
1) File menu => New => Java project
[email protected] Naresh i Technologies
2) Type project name "first"
3) Click on next button & click on finish button
4) Click on don't create button
5) Right click on first in a package explorer, click on new & click on class
6) Type class name "Demo"
7) Select main() method
8) Click on finish button
9) Type sysout & click on ctrl+space bar
10) Type "Welcome"
To run welcome program:
1) Right click on Demo.java in package explorer
2) Run As => Java application
3) Click on Ok button
4) Output displayed in console view
5) To clear the console, click on clear console icon on console view tool bar
To open command prompt(terminal):
1) Click on terminal icon (or) Short cut key(Ctrl+Alt+Shift+T)
2) Click on Ok button
3) type java Demo.java
To pass command line arguments:
1) Right click on Demo.java in package explorer
2) Run As => Run configurations
3) Click on arguments
4) Type hello in program arguments
[email protected] Naresh i Technologies
5) Click on Run & Click on Ok
(or)
1) Click on terminal icon & click on ok button
2) type java Demo.java hi
To open views:
1) Window Menu => Show view => Select the view
To Configure Tomcat Server:
1) Right click on servers view => New => Server
2) Expand Apache => Select Tomcat v9.0 Server
3) Click on Next button
4) Select Tomcat installation directory by clicking on Browse button
Example: C:\Program Files\Apache Software Foundation\Tomcat 9.0
5) Click on Finish button
To Write Servlet Program:
1) Click on File menu => New => Dynamic Web Project
2) Type project name “first” & Click on next button
3) Click on next button
4) Select check box to generate web.xml file
5) Click on finish button
6) Right click on first in project explorer
7) New => Servlet
8) Type package name “first”
9) Type class name “FirstServlet”
10) Click on next button
[email protected] Naresh i Technologies
11) Click on next button
12) Click on finish button
To Run the Servlet program:
1) Right click on first in project explorer
2) Run As => Run on Server
3) Click on next button
4) Click on finish button
5) Type url-pattern “FirstServlet” in address bar in a browser window
To change port number or to solve port number error:
1) Double click on tomcat server in servers view
2) Tomcat admin port change to 8005
To open external browser:
Window Menu=>Web Browser=> Default system web browser
By
Mr. Venkatesh Mansani
Naresh i Technologies