Development environment based on open source Entry into the Eclipse IDE
Eclipse is an open source development environment. In addition to Java, other programming languages can now be used, for example Python, C, PHP or HTML.
Companies on the topic
Eclipse has become known as an integrated development environment for Java, but now supports many common languages.
Java developers often rely on the Eclipse development environment. To start with Eclipse, the IDE can be downloaded directly from the developers. After downloading, you can use the installation wizard to select the language for which Eclipse should be installed. In general, Eclipse offers its own editor for each language.
Download and install Eclipse
In addition to the IDE, the individual packages can also be found directly on the project website. The parent installer for Eclipse is not necessary. Sometimes the installation of Eclipse packages via the installer fails, but works when the package is downloaded and started directly.
The start takes place from the unpacked archive via the file “eclipse.exe“. For working with Eclipse, however, it is not necessary to download the Java JDK separately. All required data are included in the download of the corresponding archive.
First steps with Eclipse-the first Java project
When starting Eclipse, for example for development with Java, the IDE first asks for the directory for the workspace. This is the directory for the project where Eclipse stores all data. Then Eclipse loads all the necessary data and displays the welcome screen. If its tab is closed, work can begin with Eclipse.
Picture gallery with 12 pictures
Depending on the package used, for example, a new Java program can be developed with “Create a Java project”. This option is also available via “FileNewProject” or “FileNewJava-Project”. In the settings for the project it is possible to make various adjustments. Using the example of Java, you can also configure the used JRE to be used with the project.
Various tabs are available via the setup wizard for a new project, which can be used, for example, to make special Java build settings. Loading additional libraries is also possible via the wizard. After that, the project can be created with “Finish” and Eclipse is ready for development with Java.
Developing Java project in Eclipse
Using the example of Java, the new project is initially an empty construction. Various commands are available via the context menu of the project in Eclipse, including New and Class. The options for adding new objects are also available via “FileNew”.
A new Java class can also be stored in the project. A name for the package and the class can be specified in the window. Options for the classes can also be controlled here, for example …
public static void main(String args)
… , i.e. defining a main method. After that, the programming work can begin. For example, for a test, the following line can be inserted and the command executed:
To execute code, in Eclipse, the class on the left can be clicked with the right mouse button. The program starts with” Run asJava Application”. Alternatively, various icons are available in the menu bar. The result can be seen at the bottom of the window. The icons save the selection options of the last start. The possibilities for starting depends on the configuration and type of the class.
The “Run configurations” selection allows you to select during development what Eclipse should consider when running a program and which options should possibly be used at startup. The parameters can be specified via the “Arguments” tab. When working with several classes in parallel, “Run configurations” can be used to define which class is to be executed via “Main”.
Understanding the Eclipse Interface-Views and Perspectives
Eclipse consists of different views. For example, Eclipse displays the Package Explorer on the left margin, in which the data of the current project can be seen. In the Package Explorer, Eclipse displays the files of a project as well as the links, for example the linked JRE version.
With the View” Navigator”, Eclipse displays the actual project files on the left side without links. However, most developers use the Package Explorer because the navigator is classified as deprecated. The most important file of the current Java program is the file with the extension *.java, which belongs to the project. The basis of the project is always the directory that was stored in Eclipse’s workspace.
Picture gallery with 12 pictures
At the bottom of the window you can see the views “Problems”, “Javadoc”, “Declaration” and “Console”. “Console” displays the result of the executed program. The different views can be selected via the menu item “WindowShow View”. This allows developers to create their own environment in Eclipse. At this point, numerous views are available, only the few are shown by default.
At the same time, Eclipse provides perspectives. These are managed via “WindowPerspectice”. When developers work with a specific group of views that are often shared, for example, for debugging programs, these views can be grouped together in one perspective and thus arranged and displayed together.
With” WindowPerspecticeOpen Perspective ” the saved perspectives can be loaded. After the Perspective is activated, Eclipse displays the Perspective views in its interface in the specified view. The view of these perspectives can be adjusted at any time via” Window”.