Getting started with the Eclipse platform (documentation). Eclipse - development environment for modular cross-platform applications

Eclipse is a framework that allows you to develop cross-platform modular applications. Eclipse is the development environment most often used to create various applications for the desktop. The architecture of the platform is simple - a kernel for loading the framework, an environment for delivering dynamic components, text editors and file buffers, working environment to write, compile and run code.

Framework involves creating software with open source, so the license is free and you can download Eclipse for free. Platform, thanks to connection different modules, allows you to develop almost any client application in all popular programming languages ​​- Java, C++, Python, etc. You can connect a separate module for working with graphical interfaces. The created applications work under different operating systems - they are suitable for Windows, Linux and Mac OS, Android is also supported. Programs created in Eclipse are separate modules that connect to the main application. Some applications combined into libraries for Eclipse can be downloaded from open access, which will greatly simplify the work on your own program.

Eclipse is a framework independent of the Windows family of platforms, with the exception of standard library Swing for Java, replaced by SWT, which is built for all known and used programming platforms. The library is based on the operating system, so it is used graphic elements OS. This feature may make the application incompatible with other operating systems. You can download Eclipse in Russian, which will greatly simplify working with applications for different OSes. In addition, there are quite a lot of reference information and forums dedicated to the framework.

Advantages of the Eclipse development environment:

  • support for all popular programming languages;
  • development of applications for different operating systems;
  • the ability to download the necessary modules for free;
  • plugins provide framework flexibility;
  • free license and open source.

Eclipse development environment

Eclipse was originally developed by IBM as a successor to the IBM VisualAge development environment, as a corporate IDE standard for development on different languages for IBM platforms. According to IBM, design and development cost $40 million. The source code was fully open sourced and made available after Eclipse was made available to further development community independent from IBM.

Eclipse 3.0 (2003) adopted the OSGi service platform specifications as the runtime architecture. Since version 3.0, Eclipse has ceased to be a monolithic IDE that supports extensions, and itself has become a collection of extensions. It is based on the OSGi and SWT/JFace framework, on the basis of which the next layer is developed - RCP (Rich Client Platform, a platform for developing full-fledged client applications). RCP serves as the basis not only for Eclipse, but also for other RCP applications such as Azureus and File Arranger. The next layer is Eclipse itself, which is a set of RCP extensions - editors, panels, perspectives, the CVS module and Java module Development Tools (JDT).

Since 2006, the Eclipse Foundation has coordinated an annual Simultaneous Release, which occurs in June. Each release includes the Eclipse platform as well as a number of other Eclipse projects.

Eclipse primarily serves as a platform for developing extensions, which is why it has gained popularity: any developer can extend Eclipse with his own modules. Already exist Java Development Tools (JDT), C/C++ Development Tools (CDT), developed by QNX engineers together with IBM, and tools for Ada languages ​​(GNATbench, Hibachi), COBOL, FORTRAN, PHP, etc. from various developers. Many extensions complement the Eclipse environment with managers for working with databases, application servers, etc.

Eclipse JDT (Java Development Tools) is the most famous module aimed at group development: the environment is integrated with version control systems - CVS, GIT in the main package, there are plugins for other systems (for example, Subversion, MS SourceSafe). Also offers support for communication between the IDE and the task (error) management system. The main package includes support for the Bugzilla bug tracker, and there are also many extensions to support other trackers (Trac, Jira, etc.). Due to free and High Quality,Eclipse is the corporate standard for application development in many organizations.

Eclipse is written in Java, therefore it is a platform-independent product, with the exception of the SWT library, which is developed for all common platforms (see below). The SWT library is used instead of the standard Java Swing library. It relies entirely on the underlying platform (operating system), which ensures fast and natural appearance user interface, but sometimes it causes different platforms Application compatibility and stability issues. The basis of Eclipse is the rich client platform (RCP). It consists of the following components:

OSGi (standard bundles delivery environment);

SWT (portable widget toolkit);

JFace (file buffers, working with text, text editors);

Eclipse work environment (panels, editors, projections, wizards).

GUI in Eclipse, written using the SWT toolkit. The latter, unlike Swing (which independently emulates graphical controls), uses the graphical components of this operating system. The Eclipse user interface also depends on a GUI middleware called JFace, which makes it easy to build an SWT-based user interface.

Eclipse's flexibility is ensured by plug-ins, which makes it possible to develop not only in Java, but also in other languages, such as C/C++, Perl, Groovy, Ruby, Python, PHP, Erlang, Component Pascal, Zonnon and others.

Java is high level language programming, which was developed by Sun Microsystems back in 1995. Today, the company JCP (Java Community Process) is developing this technology. One of the main features of the language is compilation, which is performed directly when the program is assembled.

The code is turned into bytecode and then executed in virtual machine Java. The JVM acts as a translator that connects the programming language with necessary components computer. This principle allows programs to run on any system where a virtual machine is installed.

Features of the programming language

Java is an object-oriented and typed language with many useful features for developers. Among them are the following:

  • Easy to learn. Basic knowledge of object-oriented programming will be enough to comfortably master the language.
  • Object-oriented methodology. Programs consist of objects that can be easily expanded and adapted to achieve your goals.
  • Safety. Encryption with public key provides best practices authentication.
  • Platform-independent. Programs written in the language are compiled into bytecode, which can run on absolutely any platform of modern operating systems.
  • Portability. The programming language is independent of the implemented aspects of the specifications.
  • Strength. The Java machine is able to cope with many errors due to the development company's orientation and emphasis on constant check and reducing the time costs incurred during compilation.

Besides, given language quite common, as it is characterized as multi-threaded, high-performance, interpreted and dynamic.

Features of Java Software Platforms

There are several implementations of this platform, among which Eclipse occupies a special place. The development environment for modular cross-platform applications has a number of mandatory features that are also present in other similar products. Among them are:

  • Common technologies for deploying programs in the user environment.
  • Creation Tools graphical interfaces of any complexity.
  • Libraries for remote control objects and program access to data.
  • Tools for launching, debugging, compiling, monitoring and other actions with applications.

What is Eclipse?

Eclipse is a development environment currently controlled by the Eclipse Foundation. It is open source, which provides new opportunities for developers. It is written in Java and is intended to improve the software creation process.

This project is an infrastructure that provides important basic services. Available tools allow you to create new technologies in Eclipse. The development environment is not just a collection of APIs - it can handle full-fledged tasks.

A huge number of open source plugins provide unlimited possibilities for toolkit developers. Any additions can be added to the program, which ultimately allows you to customize and adapt it to any task.

Platform Features

The programming environment has the following features:

  • A wide API assembly for adding new modules, as well as a framework for programming any extensions.
  • Supports all popular operating systems.
  • Most programming known languages Eclipse, the development environment, allows this. C sharp (C#), Java, PHP, C, Python, C++ and many other languages ​​are supported by this program.
  • RCP technology is available, the capabilities of which will be sufficient to develop client software of any complexity and scale.
  • The modularity of the program provides incredible convenience and flexibility in operation.

The Eclipse project continues to evolve in many directions. The program is constantly improving, expanding its functionality by adding new plugins.

Platform architecture

The programming environment consists of several basic elements. Firstly, this is the Eclipse Runtime, which is responsible for running modules and plugins. This execution environment includes basic functionality. This includes managing updates, interacting with the system, configuring plugins, and maintaining the functionality of the help section.

Secondly, this is the IDE itself, which is responsible for managing projects, leading elements of the program, as well as debugging, team development and searching among files.

Plugins such as PDE and Java Development Tools are also included in Eclipse. The development environment for Java programs and new add-ons using these plugins becomes much more functional.

Examples of other specialized assemblies

The above Eclipse SDK is one version of the platform. Several more IDE builds are available with unique features, namely:

  • For Java EE Developers. The version is intended for programming corporate or web applications with using Java EE.
  • For JavaScript Web Developers. Assembly for creating web products with using CSS, XML, HTML and JavaScript.
  • For Java Developers. Java programming version.
  • For C/C++ Developers. Assembly for programming in C++ and C languages.

Each version has unique features, but the basic functionality for beginners is fully provided by the standard Eclipse (development environment). Lessons on it are available online for free, which will greatly simplify learning the program.

Competing Products

This development environment has many competitors, but it is impossible to finally choose the best representative. Eclipse can confidently be considered the most popular. Almost all developers used it, thanks to a number of undeniable advantages.

During development mobile applications Eclipse (development environment) is often used. The Android platform is developing rapidly, and the support for the Java language in this IDE attracts developers. However, it is worth noting that its capabilities are much greater.

The main competitor of the program in question is the NetBeans product, and it is completely free. You have to pay for an Eclipse license, and this puts some people off. Among other competing products we can also highlight IntelliJ IDEA, JDeveloper, Android Studio, DrJava and MyEclipse. But many consider Eclipse to be the best. The development environment has been pleasing users for many years and continues to do so!

IDE (Integrated Development Environment), or integrated development environment in Russian, is a tool designed for software development. We wrote the program code in text editor, then compiled and ran the program via the command line, which is not entirely convenient. The IDE allows you to unified environment write, compile, run and debug a program.

The most popular free IDEs for Java programmers are: Eclipse, NetBeans and IntelliJ IDEA. There is a a lot of controversy about what IDE is better However, there is no clear answer to this question; it all depends on the range of problems that need to be solved. Also, each programmer usually chooses the one that is more convenient for him and to which he is accustomed. At the initial stage, you can choose any one, it doesn’t matter.

Also, there are many supporters of the theory that for the first few months you should work exclusively with a notepad and command line, because this is the only way to understand how everything works from the inside, and there is truth in this. But, after several unsuccessful attempts compilation and manual correction syntax errors in code, you may simply lose the desire to do it further, so I am a supporter of immediately moving to the IDE.
In any case, the choice is yours.

In this tutorial we'll look at how to get started with the Eclipse IDE.

  • Install Eclipse IDE on your computer
  • Let's create a Hello World program in it.

Installing and Running Eclipse IDE

  1. Follow the link http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/keplerr and download Eclipse corresponding to the operating system.
    Installation for Windows will be discussed next.
  2. Unpack the downloaded .zip archive into a directory C:\Program Files\
  3. This completes the installation!
  4. To launch Eclipse IDE, you need to open the file eclipse.exe located in the folder C:\Program Files\eclipse\.
  5. When launched, a window will open asking you to select work area(Workspace) where they will be stored program files project. We indicate the directory convenient for us (Fig. 3.1.) and click OK.

6. Close the welcome message (Fig. 3.2.), thereby moving to the working environment.

Getting started with Eclipse IDE

Now let's create new project. To do this, select the menu File->New->Project..

In the window that opens, select Java Project(Fig. 3.3.) and press Next.

In the next window, enter the name of our project (Fig. 3.4.) and click Finish.

The project will appear on the left side of the screen and should contain the element JRE System Library(Fig. 3.5.)

If this element is not there, then you need to add it manually! For this we choose Windows -> Preferences, in the window that opens Preferences on the left we will select Java -> Installed JREs, press the button Add… on the right (Figure 3.6.). In the window that opens, select Standard VM and press the button Next.

In the window that opens Add JRE, indicate the directory in which Java is installed (Figure 3.7.) and click Finish.

The first step is to create a class. Let's click right click on the project folder and select from the context menu New -> Class(Figure 2.7.).

In the window that opens New Java Class enter the name of the project class HelloWorld and check the box for the method public static void main(String args)(Figure 2.8.). Click Finish.

As a result, Eclipse will create new class Hello World

Let's open the created class and complete our program. Let's add the following code to the main method (Figure 2.9.).

System.out.println("Hello World");

Let's save the changes using the Ctrl+S keys or the special icon at the top of the toolbar. Ready!

In the window that opens, on the left side, double-click on Java Application after which, a new element will be created with the name New_configuration, which we can later change on the right side. On the right side we will also fill in the fields Project And Main Class. Project must contain the name of the project, Main Class - the name of the main class, in our case - HelloWorld( rice. 3.10). Then click Apply And Run.

As a result, the words will be printed in the console Hello World(Fig. 3.11).

To launch the program in the future, just press special icon on the toolbar by selecting Hello World(Fig. 3.12.).

This concludes this lesson.

Detailed instructions for working with Eclipse, although English language, can be found at: http://www.vogella.com/articles/Eclipse/article.html

Eclipse is a software development platform based on Java and provides the ability to develop programs with plugins. Contains a set of built-in components, among which is the well-known Eclipse product - the PDE plugin development environment. PDE allows you to extend the platform itself, which is made up of built-in components. Toolkit creators can offer their own extensions and provide users with a complete development environment (IDE).

In addition to the Java language in which Eclipse is written, the development environment is also used for other programming languages. Many plugins have been created that support the languages ​​C++, Fortran, Perl, Prolog, Python, Ruby, etc. The platform can be the basis for other software that is not related to writing programs, for example, telnet and DBMS. Another example of Eclipse based code is the PDT development environment with basic functions for editing and debugging PHP applications.

All rights are perverted

Open source software is licensed to ensure user rights. For example, original program must be provided with the right to modify and distribute it. This level of rights protection is achieved using copyleft. Copyright protects copyright by prohibiting the distribution of programs in cases where the user does not have this right. Copyleft also requires that the distributed software be covered by a license without modification. In this case, the essence of copyright becomes the opposite. Copyleft uses copyright not to preserve the rights of developers, but to transfer them to users.

Therefore, there are fears and doubts that open source software will lead to loss intellectual property, since copyleft will extend to other parts of the software. In other words, the license will require that the entire application containing open source code be distributed with the same rights. This is true for the General Public License (GNU) - Linux is distributed under it. But there are permits that provide a different relationship of public and commercial interests.

OSI is non-profit organization, which clearly defines what open source is and approves licenses that meet its criteria. Eclipse Platform distributed under EPL, open license, certified by OSI and facilitating its commercial use while maintaining the loyalty of open source authors.

Plugin creators or software development environment users must publish any Eclipse code they use or modify, but are free to license their own add-ons in any way they choose. Transfer of rights to them as open software is not required, nor is the publication of the source code required.

And although many will not use Eclipse to create own developments, availability source code platforms has great importance not only because there is no fee, but also because it promotes innovation and encourages programmers to contribute their own product as a contribution to the common good. main reason This means that the more work put into a project, the more significant it is for everyone. If it is useful, then the number of developers increases even more and a community is created around the project, similar to those that arose around Linux and Apache.

Non-profit organization

Eclipse is a development environment, libraries and tools for creating, deploying and managing software, as well as a community of its creators. The platform was created by IBM in 2001 with the support of software suppliers.

The Eclipse Foundation was established in 2004. It is a non-profit association that supports platform projects and improves the developer community and the system of complementary programs and services. Today, the Eclipse ecosystem includes organizations and individuals in the software industry.

The Foundation monitors and manages platform projects. It serves the community, and the developers, called committers, are not on staff. They are employees of other organizations or independent programmers who volunteer their personal time to work on the project.

Eclipse: platform characteristics

  • Creation of various program development tools.
  • Unlimited number of tool providers, including independent ones.
  • Tool support for working with various content, such as HTML, C, EJB, Java, JSP, GIF and XML.
  • Ensuring seamless integration within and between different content.
  • Eclipse is a program development environment with or without it.
  • Work in different operating systems, including Linux, Windows, Solaris AIX, Mac OS X.
  • Using Java, a popular language for writing tools.

Eclipse Getting Started Guide

After the first launch of the program, a welcome message appears. The user can go to the overview and learn new features, examples or training.

The workspace is made up of view panels. The set of ideas is called perspective. The Resources perspective, for example, includes views for editing, managing, and viewing projects.

Beginners should start with Toolspace Basics, which provides a wealth of information about the different parts of Eclipse and how they interact.

Working with JDT

To get acquainted with JDT, you can open the Eclipse Java project. To do this, select the menu item "File" - "New" - "Java Project", enter the project name and click "Finish".

To change the current perspective, you must select the menu item "Window" - "Open perspective" - ​​Java or open a new window through "Window" - "New window" and select another perspective.

A perspective contains views that are designed to be developed on Java language. In the left corner, at the top, there is a hierarchy with Eclipse Java packages, classes, JAR archives and different files, which is called "Package Explorer". At the same time, the main menu was replenished with 2 items: Source and Refactor.

Creating a Program in JDT

To create Java application, you should right-click on the previously created project and select “New” - “Class”. In the pop-up dialog box, enter the class name. The question is: “What method templates do you want to create?” - specify public static void main(String args) and click “Finish”.

As a result, a program will be created containing the entered class and an empty main(). Method must be filled in program code(declaration j omitted intentionally):

public class Hello (

public static void main (String args) (

for(j=0; j<=5;j++)

System.out.println(“Hello”);

While typing, you can notice the editor's capabilities:

  • autocompletion;
  • syntax checking;
  • Auto-close opening bracket or quotes.

Code completion is called by the keyboard shortcut Ctrl + spacebar. This will display a context-dependent list of keyboard or mouse selectable options, be it a list of the object's methods or part of a keyword.

Syntax is checked against incremental compilation. It occurs while writing the code simultaneously with its compilation. Syntax errors are underlined in red, and a red dot with a white oblique cross appears to the left of them. Other errors are indicated in the margins in the form of a light bulb. You can fix them yourself using Quick Fix.

In the example you entered, the light bulb is placed next to the for statement because there is no i declaration. After double-clicking on the light bulb, a list of possible fixes will appear. In this case, for j it is proposed to create:

  • class field;
  • method parameter;
  • local variable.

If you select one of the options with the mouse, you can see the resulting text.

Double clicking on the required option generates the program code.

Launching the application

If there are no compilation errors, the application can be launched through the Start menu item. There is no compilation step, since it is done while saving the code. In the “Run Configuration” dialog that appears, the necessary values ​​​​of which have already been set, you need to click on the Run button on the right, below. A console will appear at the bottom with bookmarks and the result of the application.

The program can be run in a debugger. First of all, a breakpoint is set in System.out.println() by two mouse clicks on the gray field to the left of the editing window, next to the method call. As a result, a blue dot will appear. Select the "Start" menu - "Debug". The Launch Configuration window will appear again. After clicking the Start button, the Debug perspective will appear with new views.

In the "Debug" view, on the left, at the top, there is a call stack for controlling the progress of the program. The panel contains buttons for stopping, continuing, and terminating the application, executing and skipping the next statement, and returning from a method. At the top right there is a series of panels with tabs: variables, breakpoints, expressions and screen. When you select the variables tab, you can see the value of variable j.

Contextual clues can provide detailed information about each view. You just need to click on the panel title and press F1.

Additional plugins

Software development environments designed for modifying, compiling, and debugging are enhanced in Eclipse with components that can model, build automation, unit test, performance, configuration, and version control.

The CVS source management system allows you to navigate over them. In this case, the changes made are not mixed. It is an important and integral part of Eclipse.

The development environment is located at eclipse.org. Plugins are located in the Plug-in Central directory.

Architecture

The basis of the platform is functionally rich RCP clients. Simplified, they can be represented as a set of plugins used in program development. There are also additional recommended and optional components.

The main components are as follows:

  • The runtime defines the component model based on the OSGi specification, extensions, and extension points. Also provides additional services such as syslog and concurrency.
  • The SWT package contains Eclipse function and user interface widgets. It has an add-on with classes that make it easier to create graphical applications.
  • Toolspace includes perspectives, views, and editing windows.
  • The Help component provides user support in the form of a help system or an interactive task list.
  • The Update plugin allows you to get the latest software version.
  • The Team component offers an infrastructure for connecting your own

The platform created by IBM has become a fully functional open source system. Its participants include over a hundred companies. Although there had been ideas about creating such systems before, Eclipse's thoughtful, reliable and elegant design has positioned it at the forefront.