How to set up smartphones and PCs. Informational portal
  • home
  • News
  • Learning Java. What does Java have to do with dynamic languages ​​and functional programming? Java version history

Learning Java. What does Java have to do with dynamic languages ​​and functional programming? Java version history

So, Java has a long and difficult history of development, but it's time to consider what happened to the creators, what properties this technology has.

The most widely known, and at the same time causing the most heated debate, property is a lot or cross-platform. It has already been said that it is achieved through the use of the JVM virtual machine, which is regular program, which is executed by the operating system and provides Java applications with all the necessary features. Since all JVM parameters are specified, the only task left is to implement virtual machines on all existing and used platforms.

The presence of a virtual machine defines many properties of Java, but for now let's focus on the next question - is Java a compiled or interpreted language? In fact, both approaches are used.

The source code of any Java program is represented by ordinary text files that can be created in any text editor or specialized development tool and have the .java extension. These files are fed into the Java compiler, which translates them into a special Java bytecode. It is this compact and efficient instruction set that is supported by the JVM and is an integral part of the Java platform.

The output of the compiler is stored in binary files with .class extension. A Java application consisting of such files is fed into the virtual machine, which starts executing or interpreting them, since it is itself a program.

Many developers initially criticized Sun's bold "Write once, run everywhere" slogan, finding more and more inconsistencies and inconsistencies across platforms. However, it must be admitted that they were simply too impatient. Java was just born, and the first versions of the specifications weren't comprehensive enough.

It didn't take long for Sun to come to the conclusion that it wasn't enough to simply publish specifications freely (which had been done long before Java). It is also necessary to create special procedures for testing new products for compliance with standards. The first such test for the JVM contained only about 600 checks, a year later their number grew to ten thousand and has been increasing since then (it was precisely this test that MS IE 4.0 could not pass at one time). Of course, the authors of virtual machines have been improving them all the time, eliminating errors and optimizing work. Still, any technology, even very well conceived, takes time to create a high-quality implementation. Java 2 Micro Edition (J2ME) is currently following a similar development path, but more on that later.

The next most important property is Java object orientation, which is always mentioned in all articles and press releases. The object-oriented approach (OOP) itself is discussed in the next lecture, but it is important to emphasize that in Java almost everything is implemented in the form of objects - threads of execution (threads) and data streams (streams), networking, working with images, with a user interface , error handling, etc. After all, any Java application is a set of classes that describe new types of objects.

A detailed discussion of the Java object model is carried out throughout the course, but we will outline the main features. First of all, the creators abandoned multiple inheritance. It was decided that it made the programs too complicated and confusing. The language takes an alternative approach, the special type 'interface'. It is discussed in detail in the corresponding lecture.

Further, Java uses strong typing. This means that any variable and any expression has a type already known at the time of compilation. This approach is used to simplify the identification of problems, because the compiler immediately reports errors and indicates their location in the code. Search the same exceptional situations(exceptions - this is how incorrect situations are called in Java) during program execution (runtime) will require complex testing, while the cause of the defect may be found in a completely different class. Thus, it is necessary to make additional efforts when writing code, but its reliability is significantly increased (and this is one of the fundamental goals for which the new language was created).

There are only 8 data types in Java that are not objects. They have been defined since the very first version and have never changed. These are five integer types: byte, short, int, long, and they also include character char. Then two fractional float type and double, and finally the boolean type boolean. Such types are called simple, or primitive (from the English primitive), and they are discussed in detail in the lecture on data types. All other types are object or reference types. reference).

For some reason, the syntax of Java has misled many. It is really created on the basis of the syntax of the C/C++ languages, so if you look at the source code of programs written in these languages ​​and in Java, it is not immediately possible to understand which one is written in which language. This has somehow led many to think that Java is a simplified C++ with additional features such as the garbage collector . We will consider the automatic garbage collector (garbage collector) a little lower, but it is a big misconception that Java is the same language as C ++.

Of course, when developing a new technology, the authors of Java relied on a widely used programming language for a number of reasons. Firstly, at that time they themselves considered C ++ to be their main tool. Secondly, why invent something new when there is a perfectly suitable old one? Finally, it is obvious that unfamiliar syntax will scare off developers and significantly complicate the introduction of a new language, and Java should have become widespread as quickly as possible. Therefore, the syntax has been only slightly simplified to avoid overly complicated constructions.

But, as already mentioned, C++ was fundamentally unsuitable for the new tasks that the developers at Sun set themselves, so the Java model was rebuilt, and in accordance with completely different goals. Further lectures will gradually reveal specific differences.

As for the object model, it was rather modeled after languages ​​such as IBM's Smalltalk, or the Simula language developed back in the 60s at the Norwegian Computing Center, to which Java creator James Gosling himself refers.

Another important property of Java - ease of learning and development - also received mixed reviews. Indeed, the authors have taken the trouble to save programmers from the most common mistakes that even experienced C/C++ developers sometimes make. And the first place here is occupied by work with memory.

In Java from the very beginning was introduced automatic garbage collection mechanism(from the English garbage collector). Suppose a program creates some object, works with it, and then there comes a moment when it is no longer needed. It is necessary to free the occupied memory so as not to interfere with the operating system to function normally. In C/C++, this must be done explicitly from the program. Obviously, with this approach, there are two dangers - either to delete an object that someone else needs (and if it is actually accessed, then an error will occur), or not to delete an object that has become unnecessary, which means a memory leak, that is The program starts to consume more and more RAM.

When developing in Java, the programmer does not think about freeing memory at all. The virtual machine itself counts the number of references to each object, and if it becomes equal to zero, then such an object is marked for processing by the garbage collector . Thus, the programmer only has to make sure that there are no references to unnecessary objects. The garbage collector is a background thread of execution that regularly scans existing objects and removes those that are no longer needed. The program cannot affect the work of the garbage collector in any way, you can only explicitly initiate its next pass using a standard function. It is clear that this greatly simplifies the development of programs, especially for novice programmers.

However, experienced developers were unhappy that they could not fully control everything that happened to their system. Not accurate information, when exactly an object that has become unnecessary will be deleted, when the garbage collector thread will start working (and therefore occupy system resources), etc. But, with all due respect to the experience of such programmers, it should be noted that the vast majority of failures of programs written in C / C ++ are due to incorrect work with memory, and sometimes this happens even with widespread products of very serious companies.

In addition, special emphasis was placed on the ease of mastering the new technology. As already mentioned, it was expected (and these expectations were justified, confirming the correctness of the chosen path!) that Java should receive the widest possible use, even in those companies where they had never done programming at this level before ( Appliances such as toasters and coffee makers, creating games and other applications for cell phones etc.). There were a number of other considerations as well. Products for general users, not professional programmers, need to be particularly reliable. The Internet has become the World Wide Web as non-professional users have appeared, and the ability to create applets for them is no less attractive. They needed a simple tool to build robust applications.

Finally, the Internet boom of the 90s gained momentum and put forward new, more stringent requirements for development time. Multi-year projects that were commonplace in the past no longer met the needs of customers, new systems had to be created in a maximum of a year, or even in a matter of months.

In addition to the introduction of the garbage collector , other steps have been taken to make development easier. Some of them have already been mentioned - rejection of multiple inheritance, simplification of syntax, etc. The ability to create multithreaded applications was implemented in the first version of Java (research showed that this is very convenient for users, and existing standards rely on teletype systems that have been outdated for many years back). Other features will be discussed in later lectures. However, the fact that it is indeed easier to create and maintain systems in Java than in C/C++ has long been a generally accepted fact. However, all the same, these languages ​​​​are created for different purposes, and each has its own undeniable advantages.

The next important property of Java is security. The initial focus on distributed applications, and in particular the decision to run applets on the client machine, made security a top priority. When running any Java virtual machine, a whole range of measures apply. The following is just a brief description of some of them.

First, these are the rules for working with memory. It has already been said that the memory is cleared automatically. Its reservation is also determined by the JVM, not by the compiler, or explicitly from the program, the developer can only indicate that he wants to create another new object. There are no pointers to physical addresses in principle.

Secondly, the presence of a virtual machine-interpreter makes it much easier to cut off dangerous code at each stage of work. First, the bytecode is loaded into the system, usually in the form of class files. The JVM carefully checks that they all obey the general Java security rules and that they are not created by attackers using some other means (and are not corrupted in transit). Then, during the execution of the program, the interpreter can easily check each action for validity. The capabilities of classes that have been loaded from a local disk or over the network differ significantly (the user can easily assign or remove specific rights). For example, applets will never access the local file system by default. Such built-in restrictions are found in all Java standard libraries.

Finally, there is a mechanism for signing applets and other applications downloaded over the network. A special certificate guarantees that the user received the code exactly in the form in which it was released by the manufacturer. This, of course, does not additional funds protection, but allows the client to either refuse to work with applications from untrusted manufacturers, or immediately see that unauthorized changes have been made to the program. At worst, he knows who is responsible for the damage.

The combination of the described properties of Java allows us to assert that the language is very suitable for developing Internet and intranet (internal corporate networks) applications.

Finally, an important distinguishing feature of Java is its dynamism. The language is very well conceived, hundreds of thousands of developers and many large companies are involved in its development. The main stages of this development are briefly outlined in the next section.

So, let's sum up. The Java platform has the following advantages:

  • portability, or cross-platform ;
  • object orientation, an effective object model has been created;
  • familiar C/C++ syntax;
  • built-in and transparent security model;
  • orientation to Internet-tasks, network distributed applications;
  • dynamism, ease of development and adding new features;
  • ease of learning.

But you should not assume that easier learning means that you do not need to learn a language at all. To write really good programs, to create large complex systems, you need a solid understanding of all the basic concepts of Java and the libraries used. That is what this course is about.

Major Versions and Products of Java

Let's make a reservation right away that products here mean software solutions from Sun, which are "reference implementations".

So Java was first announced on May 23, 1995. The main products available as beta versions at that time were:

  • Java language specification, JLS , Java Language Specification (describes vocabulary, data types, basic constructs, etc.);
  • JVM specification;
  • Java Development Kit , JDK - A developer's tool consisting mainly of utilities, standard class libraries, and demos.

The specification of the language was compiled so well that it is used almost unchanged to this day. Of course, a large number of clarifications have been made, more detailed descriptions, and some new features have been added (for example, declaring inner classes), but the basic concepts remain unchanged. This course in to a large extent based on the language specification.

The JVM specification is intended primarily for the creators of virtual machines, and therefore is practically not used by Java programmers.

JDK for a long time was the base application development tool. It does not contain any text editors, but operates only on already existing Java files. The compiler is represented by the javac (java compiler) utility. Virtual machine implemented java program. For test launches of applets, there is a special utility appletviewer . Finally, for automatic generation of documentation based on source code the javadoc tool is included.

The first version contained only 8 standard libraries:

  • java.lang - base classes necessary for the operation of any application (the name is an abbreviation for language);
  • java.util - many useful helper classes;
  • java.applet - classes for creating applets;
  • java.awt , java.awt.peer - a library for creating a graphical user interface (GUI ), called Abstract Window Toolkit , AWT , described in detail in Lecture 11;
  • java.awt.image- additional classes for working with images;
  • java.io - work with data streams (streams) and files;
  • java.net - networking.

Thus, all libraries start with java , they are the standard ones. All others (beginning with com, org, etc.) are subject to change in any version without compatibility support.

The final version of JDK 1.0 was released in January 1996.

Immediately explain the version naming system. The version designation consists of three digits. The first one is always 1. This means that full compatibility is maintained between all versions of 1.x.x. That is, a program written on an older JDK will always run successfully on a newer one. Where possible, backwards compatibility is also respected - if the program is compiled with a newer JDK, and no new libraries were used, then in most cases, old virtual machines will be able to execute such code.

The second digit has changed from 0 to 4 (the last one at the time the course was created). In each version, there was a significant expansion of the standard libraries (212, 504, 1781, 2130 and 2738 - the number of classes and interfaces from 1.0 to 1.4), and some new features were added to the language itself. The utilities included in the JDK have also changed.

Finally, the third digit means the development of one version. Nothing changes in the language or libraries, only errors are eliminated, optimization is performed, utility arguments can be changed (added). So, the latest version of JDK 1.0 is 1.0.2.

Although nothing is removed with the development of version 1.x, of course, some functions or classes become obsolete. They are declared deprecated , and while they will be supported until the announcement of 2.0 (which hasn't been heard of yet), their use is deprecated.

Along with the initial success of JDK 1.0, criticism also arrived. The main shortcomings found by the developers were as follows. First, of course, performance. The first virtual machine was very slow. This is due to the fact that the JVM is, in fact, an interpreter that always runs slower than the compiled code is executed. However, successful optimization that eliminated this shortcoming was yet to come. Also noted were rather poor AWT capabilities, lack of work with databases, and others.

In December 1996, it was announced a new version JDK 1.1, immediately laid out for free access to the beta version. In February 1997, the final version is released. What has been added in the new release of Java ?

Of course, Special attention was given to performance. Many parts of the virtual machine have been optimized and rewritten using Assembler rather than C as before. In addition, since October 1996, Sun has been developing a new product - Just-In-Time compiler, JIT. Its task is to translate the Java bytecode of the program into the "native" code of the operating system. Thus, the program startup time increases, but execution can be accelerated in some cases up to 50 times! Since July 1997, a Windows implementation has appeared and JIT is standard in the JDK with the ability to disable it.

Many important new features have been added. JavaBeans - a technology announced back in 1996, allows you to create visual components that are easily integrated into visual development tools. JDBC (Java DataBase Connectivity) provides access to databases. RMI (Remote Method Invocation) makes it easy to create distributed applications. Support for national languages ​​and the security system have been improved.

In the first three weeks, JDK 1.1 was downloaded more than 220,000 times, in less than a year - more than two million times. On the this moment version 1.1 is considered completely obsolete and its development stopped at 1.1.8. However, due to the fact that the most common browser MS IE still only supports this version, it continues to be used for writing small applets.

In addition, on March 11, 1997, Sun began offering the Java Runtime Environment, JRE (Java Runtime Environment). In fact, this is the minimum virtual machine implementation required to run Java applications without a compiler or other development tools. If the user only wants to run programs, this is exactly what he needs.

As you can see, the main drawback was the weak support for the graphical user interface (GUI). In December 1996, Sun and Netscape announced a new library, IFC (Internet Foundation Classes), developed by Netscape entirely in Java and designed specifically for creating a complex window interface. In April 1997, it is announced that the companies plan to combine Sun's AWT and Netscape's IFC technologies to create a new Java Foundation Classes product, JFC, which should include:

  • improved window

In this guide, we will cover everything you need to know before starting the study. programming on java. You will learn about the capabilities of the platform, its application, as well as how to start learning Java the right way.

What is the Java programming language?

In 1991, the Green Team, a division of Sun Microsystems, led by James Gosling, created a language for programming household electronic devices. At that time it was called Oak ("Oak"). Why " Oak"? Simply because this tree grew outside the window of Gosling's office.

The Green Team demonstrated the use of Oak in an interactive TV. But for digital cable television of those years, this technology was too advanced. At the same time, the Internet was gaining popularity, for which the new programming language was best suited.

After some time, the new language was renamed to Green, and after that - to Java, in honor of coffee from the island of Java. Therefore, the Java logo shows a mug of coffee.

During Java development C/C++ were popular, so Gosling made the syntax of the language similar to C/C++ and implemented for it the principle " write once - run anywhere". In 1995, Sun Microsystems released the first official version of Java. And at the same time, it was announced that Java would be included in the Netscape Navigator browser.

In 2010, Sun Microsystems, along with the Java programming language, was acquired by Oracle Corporation.

Java version history

  1. June 1991 - start of the development project programming language java.
  2. JDK 1.0 - January 1996.
  3. JDK 1.1 - February 1997.
  4. J2SE 1.2 - December 1998.
  5. J2SE 1.3 - May 2000.
  6. J2SE 1.4 - February 2002.
  7. J2SE 5.0 - September 2004.
  8. Java SE 6 - December 2006.
  9. Java SE 7 - July 2011.
  10. Java SE 8 - March 18, 2014.
  11. Java SE 9 - September 21, 2017.

Java programming language features

Java - cross-platform language

Java code written on one platform ( i.e. operating system) can be run unchanged on other platforms.

For Java startup using the Java virtual machine ( Java Virtual Machine, JVM). The JVM processes the byte code, after which the processor processes the code received from the JVM. All virtual machines work similarly, so the same code works the same way on all operating systems, which is what Java does. cross-platform language programming.

Object-oriented programming language

There are different styles of programming, and one of the most popular is object-oriented programming. With this approach, a complex problem is broken down into smaller ones by creating objects. This makes the code reusable.

Object-oriented features are found in many programming languages, including Java, Python, and C++. If you are serious about learning how to program, you should include an object-oriented approach in your learning plan.

Java is fast

Early versions programming language Java has often been criticized for being slow. But today the situation has changed dramatically. New versions of the JVM are much faster, and the processors that interpret them are getting faster.

Java is one of the fastest programming languages ​​today. Well-optimized Java code runs almost as fast as low-level programming languages ​​like C/C++ and much faster than Python, PHP, etc.

Java is a secure platform

Java is:

  • a secure platform for developing and running applications;
  • provides tools for automatic memory management, which reduces the vulnerability of the code;
  • ensures secure data transfer.

Extensive core library

One of the reasons for Java's widespread adoption is its huge standard library. It contains hundreds of classes and methods from various packages that make life easier for developers. For example,

java.lang is advanced features for strings, arrays, etc.

java.util is a library for working with data structures, regular expressions, dates and times, etc.

kava.io - library for file input/output, exception handling, etc.

Using the Java Platform

Before Learning Java programming from scratch, you need to know that more than 3 billion devices around the world are running on this platform. What exactly can it be used for:

  1. Android Applications - To develop Android applications, the Java programming language is often used in conjunction with Android SDK (from English software development kit - software development kit).
  2. Web Applications - Java is used to create web applications using server programs, Struts framework and JSP . Here are some popular web applications written in Java: Google.com, Facebook.com, eBay.com, LinkedIn.com.

It is worth noting that these sites are not necessarily written exclusively in Java, and may use other programming languages ​​as well.

  1. Software development- Programs such as Eclipse, OpenOffice, Vuze, MATLAB and many others are written in Java.
  2. Big data processing - for processing " big data"You can use the framework Hadoopwritten in Java.
  3. Trading systems- using the platform Oracle Extreme Java Trading Platform, you can write programs for trading.
  4. Embedded devices- Oracle's Java Embedded technology powers billions of devices today, such as TVs, SIM cards, Blu-ray players, and more.

Also programming on Java is used to develop games, scientific applications ( e.g. for natural language processing) and in many other areas.

Java terminology you should know

Java is a set of technologies ( programming language and computer platform ) designed to create and run software. However, the term Java is often used to refer to the programming language itself.

Programming language Java is a cross-platform, general-purpose, object-oriented programming language with a wide range of capabilities.

Java 9 is the latest version of Java at the time of this writing.

Java EE , Java Me and Java SE - these names stand for Java Enterprise Edition , Micro Edition and Standard Edition , respectively.

Java EE is aimed at applications that run on servers. Java ME is designed for power-constrained devices such as embedded devices. Java SE is the standard edition of Java for writing regular programs.

If you are new to Java programming, we recommend starting with Java SE .

JVM - Java Virtual Machine (" Java virtual machine") is a program that allows a computer to run programs written in Java.

JRE - Java Runtime Environment (" Java runtime”) includes the JVM, related libraries, and other components needed to run programs. But JRE does not have a compiler, debugger, or other development tools.

JDK - Java Development Kit Java developer) contains the JRE and other development tools such as compilers, debuggers, etc.

How to run Java on your operating system

How to Run Java on Mac OS

Here's what to do for Java programming from scratch and platform installation on Mac OS X or macOS:

  1. Download the latest version of Java ( JDK) with Java SE download pages.
  2. Double click on the downloaded DMG file and follow the instructions of the installer.
  3. To verify the installation, open a terminal and enter the following command:

javac -version

If Java is installed correctly, the version of the program will be displayed ( e.g. javac 1.8.0_60).

The next step is to install the IDE ( integrated development environment) to write and run Java code. We will install the free version of IntelliJ IDEA and run Java on it. Here's what you need to do for this:

  1. Go to IntelliJ download page and download the free Community Edition.
  1. Open the downloaded DMG file and follow the installation instructions. For quick access you can move IntelliJ IDEA to your Applications folder.
  2. Open IntelliJ IDEA. Select the option “Don’t import settings” (“ Do not import settings"") and click " Ok» . After that, accept the Jetbrains privacy policy by clicking on the "Accept" button.
  3. Now you can customize the interface for yourself. You can also skip this step and leave everything as default. If you are not sure, just skip this step by clicking the "Skip All and Set Defaults" (" Skip everything and set default settings»).


  1. The program will show you a welcome page. Click on the "Create New Project" (" Create a new project»).
  2. In the next window, select " Java"In the left panel and click" New"At the top of the program window to select" JDK» . Here you need to select the place where you installed the JDK, then click Next.


  1. You will have the option to create a project from a template ("Create project from template"). We ignore it and press the button " Next» .
  2. The next installation step programming language Java, enter the name of the project and click the button " Finish» .
  3. In the left pane you will see your project. If the panel is not visible, go to the menu Views > ToolWindows > Project.
  4. Go to Hello > New > Java and set the class name. We named it First .


  1. To run the program you just wrote, go to Run > Run... Click on First ( that is the name of the file we created


How to Run Java on Linux

To run examples from programming lessons from scratch Java on Linux will need the JAVA SE Development Kit ( JDK) and an IDE to develop your projects. Follow the instructions step by step to get started with Java.

Install Java

  1. Open a terminal and type the following command to Java installations:

    sudo add-apt-repository ppa:webupd8team/java


    sudo apt update; sudo apt install oracle-java8-installer

  1. Accept the license agreement and terms of use by clicking OK and Yes, respectively.
  2. You have installed Java. To check that the installation was successful, enter the following command in a terminal:

java-version

If the current version is displayed, the installation was successful. If not, check with Oracle help page.

Installing IntelliJ IDEA

  1. Go to .


  1. Download the free Community Edition by clicking the Download button.
  2. After download change directory in terminal to your downloads directory and extract the Java tar file to the /opt folder with the following command:

sudo tar xf .tar.gz -C /opt/

  1. After unpacking, change the directory to the IntelliJ IDEA bin folder:

    cd /opt/ /bin

  2. To start the IDE, enter the following command:
  3. Choose " Don't import settings" (" Do not import settings"") and click "OK". After that, we accept the Jetbrains privacy policyby clicking on the button "Accept» .
  4. Now for passing programming courses Java can customize the interface for you. Create a desktop shortcut for quick access to the program. After that, to launch the IDE, click " Next"At all the following steps.
  5. The program will display a welcome page. Click "Create New Project" (" Create a new project»).
  6. In the next window, select Java in the left pane and make sure Java is selected in the Project SDK row. If not, then select the location where you installed JDK: /usr/lib/jvm/java-8-oracle.


  1. Click “Next” twice and create a project.
  2. In the next step, enter the name of the project and click the button " Finish» . You will now see your project in the left pane. If this panel is not visible, go to the menu Views > ToolWindows > Project.
  3. Add a new Java class. Select src in the left pane with a right click and go to New > Java Class . Set the class name. The class name must not contain spaces.


  1. Write Java code and save the project.
  2. To run the program, go to Run > Run... Click on HelloWorld ( Project name) - the program will compile the file and run it.


How to run Java on Windows (XP, 7, 8 and 10)

To learn Java programming fundamentals and running the platform on Windows, you will need a JAVA SE Development Kit (JDK) and an IDE for project development. Follow the step by step instructions below:

Java installation

  • Go to download page Java Standard Edition Development Kit.
  1. In the Java SE Development Kit section at the top of the table, click "Accept License agreement" (" Accept license agreement"). Then click on the link Windows (x64) if you have a 64-bit operating system or Windows (x86) if you have a 32-bit OS.

  1. After downloading, run the installation file and follow the instructions that will appear on the screen. Click " Next". Select all functions by clicking " This feature will be installed on local hard drive" and copy the installation location ( it is highlighted in yellow) in Notepad, then press again " Next».


  1. During the installation process, you will be prompted to install the JRE. Click Next and then Finish to complete the installation.
  2. Now you need to edit the PATH variable. Go to Control Panel > System and Security > System. In the left pane select " Advanced system settings.

  1. Click " Environment Variables". In chapter " System Variables» find the PATH variable and in the next window click "Edit".

  1. Select all text in the " Variable value" and copy it to a separate text file. This will make it easier to edit and check for errors. See if the copied text contains the line: C : ProgramData Oracle Java javapath ; . If yes, then you can move on to the next step. If not, paste the installation location you copied earlier at the beginning of the variable and add bin at the end of the line like this: C : Program Files (x 86) Java jdk 1.8.0_112 bin ; Please note that your JDK version (jdk 1.8.0_112 ) may be different. Copy the value of the variable and paste it into the PATH box.


  1. Click " OK' to save your changes.
  2. To check if the platform is installed correctly for introduction to programming Java, open command line by typing cmd at the prompt Windows Search or through the command "Run ..." ( Windows-R). Enter the java -version command. If the current version of Java is displayed, then the installation was successful. If not, check with Oracle help page.

Installing IntelliJ IDEA

  1. Go to IntelliJ IDEA download page.
  2. Download the free Community Edition by clicking Download.


  1. Once downloaded, run the setup file and follow the instructions that will appear on the screen. Then create a desktop shortcut for the 64-bit version and add associations with the .java extension. Click " Next"And continue with the installation.


  1. Once installed, open IntelliJ IDEA by clicking on the desktop icon.
  2. Select "Don't import settings" (" Do not import settings”) and click OK. After that, we accept the Jetbrains privacy policy by clicking "Accept".
  3. Now you can customize the interface for yourself. You can also skip this step and leave everything as default by clicking the Skip All and Set Defaults button.
  4. The program will display a welcome page. Click "Create New Project" (" Create a new project»).


  1. In the next window, select " Java"In the left panel and click" New"At the top of the program window to select JDK. Here you need to select the location where the JDK was installed during the Java installation, and then click " Next".
  2. IntelliJ IDEA will find the JDK and recognize it. No other options need to be checked, just click " Next» .
  3. On the next screen, enter the project name: HelloWorld and click Finish. If the program says that the directory does not exist, click OK. If you don't see the left pane, go to Views > Tool Windows > Project .
  4. To set the class name, select the src folder in the left pane. Right click on it, go to New > Java and give the class a name. The class name must not contain spaces.


  1. Write Code and Save Java Project programming lesson.
  2. To run the program, go to menu Run > Run... Click on HelloWorld - the program will compile the file and run it.


Your first Java program

To introduce users to a new programming language, use the Hello World program (“Hello world!”). This is a simple program that displays the words Hello, World ! In this section, we will teach you how to write this program in Java using IntelliJ IDEA.

  1. Open IntelliJ IDEA.
  2. Go to File > New > Project… > Java ( in the left navigation bar).
  3. Set the project name ( Project Name ) from programming course J a va. We'll name it Hello World and click Finish.
  4. Now we need to create a new Java class.
  5. Select the src folder in the left pane, then go to File > New > Java Class and name the new class HelloWorld .
  6. Copy the following code to the HelloWorld.java file and save it.

public class HelloWorld ( public static void main(String args) (


// prints "Hello, World!"


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

  1. Press the start button ( Run). If everything is in order, you will see on the screen the inscription Hello, World!

How to learn Java?

Official Java Documentation

Oracle, the company that owns Java, publishes quality tutorials. The official documentation covers all Java features and is updated regularly.

Note: The only downside is that the official Java documentation is not always written in the simplest possible language.

If you really want to learn programming in Java, buy a good book. Of course, 1000 pages cannot be read in one day. But a good textbook will help you learn how to program.

Java: The Complete Guide (10th edition)

Great book for those who are just starting to learn Java. The latest edition includes all features of the Java 8 release.

The book covers everything you need to know about Java programming, including syntax, keywords, and programming fundamentals, as well as the Java API library, Java applets, and more.

Java Philosophy (4th edition)

If you are migrating to Java from another programming language, this book is for you. If you are starting from scratch, it is best to read it along with another.

Java 8. Pocket Reference: First Aid for Java Programmers

This book contains clear answers to questions that arise when learning J ava programming from scratch. It briefly covers all the core concepts of Java (including Java 9). Don't want to flip through hundreds of pages looking for the right line? Buy this book.

Instead of a conclusion

If you start learning Java, you can't go wrong - it's promising language programming, full of a wide variety of possibilities.

Before you start learning Java, here are a few tips:

  • Do not read tutorial articles and examples like a novel. The only way to become a good programmer is to write a lot of code.
  • If you are migrating from another programming language (say C# ), you don't need to write C# style code.
  • Find Java communities online. Once you've learned how to write simple Java programs, look for popular Java sites and forums. Try to solve problems that other programmers have. This is a great way to expand your own knowledge. Plus, if you get stuck, you'll know where to ask for help.

We hope this article will encourage you to learn Java and help you get started on your first programs.

Translation of the article “ Learn Java Programming. The Definitive Guide” was prepared by a friendly project team

We'll talk about basic Java syntax for beginners. The syntax of a programming language is a set of rules that govern how it is written and interpreted...

What is information security? This is the state of information security, which ensures its confidentiality, availability and integrity.

Usually, in order to assess the state of information security, it is necessary to understand and analyze threats and their sources, assess the level of damage, the likelihood of implementation and the relevance of threats, risks (optionally) that may affect our system / information.

In my opinion, it is impossible to assess the security of a single technology or programming language without reference to specific way implementation, i.e. without a specific finished software product in a language that has a detailed technical specification with a description of the architecture and functionality. But this will also not be enough, since it is necessary to assess the security status of a finished information system with its specific architecture, set of components, business processes, information, and, finally, people. Let me give you an example of building a house. We have materials (sand, cement, gravel, bricks, etc.) and tools (bucket, shovel, spatula, etc.). We will not be able to evaluate the quality and reliability of the finished house solely on the basis of the materials / tools used: how long it will last, whether there will be cracks in it, whether it will be cold or quiet in it. You need to choose a house project, construction technology and a team of craftsmen. And only after construction is completed, we will be able to measure compliance with the project, GOST, SNiPs, check measurements for thermal protection, noise, loads, analyze the quality of cement and answer most questions. But to the main question “how long will it last?” we will not have an exact answer, since we do not know all the operating conditions of the house and all the factors that will affect throughout the time.

How to ensure security in Java

Let's take Java as an example. . It is an object-oriented programming language; programs written in Java are translated into Java bytecode, which is executed by the Java Virtual Machine (JVM), a program that processes byte code and passes instructions to the hardware as an interpreter. The advantage of this way of executing programs is the complete independence of the bytecode from the operating system and hardware, which allows you to run Java applications on any device for which there is a corresponding virtual machine.

« Universal Language sounds nice, but the most common problem is also the other side of the coin - a memory leak in the JVM, which leads to memory overflows and crashes. In connection with this problem, vulnerabilities are not excluded, because the main postulate of reliability is the simpler the better. In this case, such a complex pie is assembled from ensuring compatibility a large number platforms and operating systems, which makes it almost impossible to track and close all the vulnerabilities found in them and quickly fix them. For the same Microsoft, vulnerabilities can be found and fixed after 4-8 years, and this is if we do not take into account the intentionally or mistakenly left undeclared features.

From my practice: when programmers add new functionality that is related to the already implemented one, or fix old functionality, then in 15% of cases they break the previously working product. And if at the same time they do not carry out full testing- at the output we have a product with new functionality, but with a partially non-working old one. There are also differences in writing code for different platforms, OS versions, software. In this regard, one can imagine how difficult it is to maintain the Java programming language and the JVM, not to mention security issues.

At the moment, Java Development Kit 10 has been released, which offers us standard security mechanisms released for Java SE 8 and described in the Security Documentation. In the tenth version, nothing new was added.

Note that Oracle has a Java Security Resource Center. In general, the company shares java security into four main sections:

A) Developers must:

Follow and use all the latest development environment and security updates;

Use code correctness control programs (for example, Checker Framework);

B) system administrators should:

Follow and use all the latest updates for Java and the necessary components for the product to work (including OS, libraries, frameworks, etc.);

Use the Java deployment rules described by and ;

Use a reliable timestamp.

C) end users must:

Always use the latest original version of Java;

D) security professionals need to:

Use advanced management and security tools (for example, Advanced Management Console);

Monitor the timely installation of all security updates;

It is important that everyone follows and complies with the rules and safety requirements. It is possible to achieve a state of safety at an adequate level only by working together and applying all available measures (technical, organizational). As my practice shows, in 60% of organizations, IT and information security services are fine with security, as well as with users who use corporate devices and are connected to a single domain. But the most uncontrolled in this area are developers, team leads, architects.

Software development and security issues

More broadly, the main causes of security problems in applications during software development are as follows:

A) Lack of understanding of security terminology in general, not to mention specific knowledge and applied solutions.

As a rule, developers have security in best case is associated with the following things: access control and logging and password protection, less often - connection protection at the https level (using encryption mechanisms that are available out of the box by default). That is, formally they will use security methods, which in fact will remain formal, “for show”, without taking into account the requirements and nuances:

For passwords: default values ​​are usually used and no additional settings are made for length, strength, change frequency, non-repeatability, number of attempts. Quite often, these parameters cannot be adjusted, since they were not included in the software development scope task, which leads to the need to add code.

On managing and logging access: at best, the developers have described the groups or user roles and access objects that should be available in the software. At worst, the developers themselves "divided" the sections and objects into the ones necessary for users and administrators. In the first case, we get a system that can be flexibly configured, but it takes a significant amount of time to set up and agree on rights. In the second - a formal system of access control. In addition, developers need to understand what kind of information and to what extent it is necessary to log. However, often they are not provided with this information, which leads to insufficient detail in the logs to analyze incidents or understand what is happening in the software. Or to excessive storage of logs and a large amount of information, which imposes significant restrictions on the ability to store information for the required period of time (for example, one to three years) or it becomes necessary to purchase additional information storages. When information is overwritten, additional problems with the speed of analysis and analysis of incidents and the speed of finding the right information. Redundancy may also require additional funding for staff expansion, the purchase of SIEM systems with customization of unique information processing rules, or lead to risks associated with outdated information. At the same time, too much time is spent on the analysis and processing of information.

Protection of communication channels is no less significant, especially for payment and banking systems, where, in addition to disclosing personal and personal data, financial losses are possible. Most often it happens that they don’t think about protecting channels and the information transmission medium, and if they do, they use the “default” settings, for example, TLS / SSL. But it also has its own peculiarities in choosing the protocol version (TLS 1.1, 1.2, 1.3 or SSL v1-3), encryption algorithm (RC4, IDEA, Triple DES, SEED, Camellia or AES), key length. Sometimes, for example, the correct TLS 1.2 protocol is selected, with AES encryption, a key length of 256 bits, but the ability to select an address on port 443 for HTTPS and or port 80 for HTTP is forgotten, instead of blocking port 80, as a result of which it becomes possible to gain access through an insecure channel. Or, for example, they raise the infrastructure on virtual machines and do not think at all about the need to close network access between virtual machines.

B) The second problem is related to the business, as it invests in specific special functionality that does not take into account security blocks.

Unfortunately, businesses do not always understand why they need to spend resources on security blocks if there is no functional benefit from them, money more product will not bring, but there are only probable risks that may not work. Businesses more often understand the need to invest in security when an information security incident has already occurred.

Unfortunately, not only business is to blame for this, but also its environment, which:

Also does not understand in security;

The budget for information security specialists was spared (they are not hired at all, or highly specialized specialists are hired, or one person is hired who is responsible for everything);

Failed to reasonably convey the need for security and correctly substantiate the current risks (reputational, financial, temporary).

C) Communication problem in the company or lack thereof.

This is the case when business and its environment understand the need and importance of information security. They allocated budgets, hired appropriate specialists, but there are difficulties in communication between business units and information security / IT services, developers.

D) Insufficient awareness of ordinary users of the company in matters of information security.

Let's assume that there are all necessary subdivisions, specialists, technical and organizational measures. But users rest and do not want to work according to the rules. This is a very common situation, and it is also necessary to solve it comprehensively, because people do not understand why they need extra work to comply with information security issues (scan files with antivirus, remember complex passwords, know and comply with policies and business processes, etc.). It is necessary to periodically arrange master classes, tell at the everyday level what information security is, what problems and solutions there are, to bring global goals and objectives of information security, to motivate them and their impact on business.

E) Lack of information security architects - information security specialists do not always participate in software development, and programmers themselves think about the security of the architecture and the use of written and ready-made security patterns (Security patterns).

The developers do not know and cannot know all the nuances, since their task is to complete the development and move on to the next one. If you delve into the development itself, the process is much more complicated than it seems. Therefore, it is necessary to clearly receive the task from the business, decompose it into understandable mini-tasks for developers, carry out development, conduct alpha and beta testing, load, functional testing, fix errors, return to tests - this process is cyclical and long. Therefore, it is not surprising that they do not have enough resources to think through the safety of the product to the smallest detail.

To be able to talk about security, you need to solve the problems described above. I do not specifically describe the options for solutions, since everything depends on specific problems, environment, conditions. There is no universal pill and every possible measure must be used. The main task is to ensure that all employees of the company understand, understand and comply with the requirements of information security and be interested in their observance. And only then it will be possible to talk about efficiency and good level maturity of information security in the company.

The Java section of developerWorks contains hundreds of articles, tutorials, tips, and content written by the Java community to help you get the most out of the Java platform and related technologies in your application development. However, for novice developers just getting started with Java, it can be difficult to navigate the sheer volume of resources available online. Therefore, we have created this page, which provides an overview of the core Java technologies in the general context of the capabilities of this language. Here you will find links to further Java learning resources, such as developerWorks articles for beginners and other educational resources, as well as download links for IBM products.

Are you a beginner Java developer? On this page you will find an overview of the main Java™ technologies and their place in modern software development. With links to introductory developerWorks articles on this and related topics, other educational resources, downloads, and IBM products, this page is an excellent starting point for learning about Java.

What is "Java technologies"?

Java is both a programming language and a platform.

First, Java is a high-level object-oriented programming language. At compilation, which is executed once during the build of the application, the Java code is converted to an intermediate language code ( bytecode). In turn, the bytecode is parsed and executed ( interpreted) the Java Virtual Machine (JVM), which acts as a translator between the Java language and the operating system hardware. All Java implementations must emulate the JVM in order to created applications could run on any system, including virtual machine Java.

Second, Java is software platform, versions of which are supplied for various hardware systems. There are three versions of Java (see the Java Platform Editions section below). The platform includes a JVM and a Java Application Programming Interface (API), which is an extensive set of ready-made software components (classes) that facilitate the development and deployment of applets and applications. The Java API covers many aspects of Java development, including basic object manipulation, network programming, security, XML generation, and Web services. The API is organized as a set of libraries called packages, which contain classes and interfaces for solving related tasks.

In addition to the API, every full implementation of the Java platform must include the following:

  • A developer's toolkit for compiling, running, monitoring, debugging, and documenting applications.
  • Standard mechanisms for deploying applications in a user environment.
  • Tools that allow you to create complex graphical user interfaces.
  • Integration libraries for program access to databases and remote manipulation of objects.

The JVM is also a proven environment for running applications written in non-Java languages. In particular, Groovy, Scala, and specialized implementations of Ruby and Python provide developers with the ability to execute dynamic and functional languages(For more information, see How Does Java Relate to Dynamic Languages ​​and Functional Programming?).

The Java language was developed by Sun Microsystems. Currently, the development of Java technologies, including work on specifications, reference implementations and compatibility tests, is carried out under the control of the JCP (Java Community Process), an open non-profit organization that brings together Java developers and license holders. In 2007, Sun released a free version of Java, including the core components of the platform, under the GNU GPL v2 (GPLv2) license. You can read more about this version in Java and Free Software Development.

Why should you learn Java?

The main advantage of the Java language is expressed in the portability of Java applications, i.e. the ability to run on any hardware platform and operating system, since all JVMs, no matter what platform they run on, are capable of executing the same bytecode.

The Java language and platform are highly scalable. You can easily create applications for devices with limited resources by adapting software originally written for desktop computers. At the same time, the Java language is also ideal for developing server-side Web applications, with the help of which the user can access computing resources on the Web. The ability to safely execute code downloaded over the web was built from the ground up in Java, so the language provides a high level of security when working over the Internet. Web applications run in runtime environments called Web containers, which provide many convenient services, including request dispatching, security and concurrency, lifecycle management, and access to APIs such as name management, transactions, and email. The series is written in Java application servers, which act as Web containers for other Java, XML, and Web service components that interact with databases and dynamically generate Web page content. These servers also provide an environment for deploying enterprise applications and tools for transaction management, clustering, security, connectivity, and required level availability, performance and scalability.

By supporting the use of open standards in enterprise applications, Java opens the door to XML-based Web services to help business partners share content and applications. Java is at the heart of many of IBM's technical consulting products and services (IBM Products and Technologies for Java Developers) and plays a key role in a number of key areas of the company's business.

  • Explore the IBM approach to , and learn how SOA helps you build heterogeneous applications that are powered by different sources both inside and outside the enterprise, thereby supporting horizontal business processes. IBM provides a number of business- and IT-focused tools to help you get started using this technology.
  • is a component approach offered by IBM, providing a full range of opportunities for strategic change. The solutions provided are based on a flexible, extensible, open standards-based software (including Java) and hardware infrastructure.

Java platform editions
There are three editions of the Java platform that enable application developers, service providers, and hardware manufacturers to create solutions that meet the needs of specific user groups.

  • Java SE ( Java Platform, Standard Edition). Using Java SE, you can create and deploy Java desktop and server applications, and develop embedded and real-time software. The Java SE edition includes the classes needed to create Web services and the core components of Java EE (Java Platform, Enterprise Edition). The current version of the Java SE platform is Java SE 6, also known as Mustang. However, many developers are still using Java SE 5 (Java 5.0, or "Tiger").
    • For an excellent overview of Java SE 5 features, see the articles in the . Most aspects of programming for the Java SE 5 platform, for which many existing applications were built, are still relevant for Java SE 6.
    • This article describes the new features in Java SE 6 for monitoring and evaluating application performance.
    • This article provides an introduction to a scripting language that runs on top of the Java SE 6 platform to simplify the programming of complex user interfaces.
    • A two-part series titled provides an introduction to the API provided by Java SE 6, which allows Java applications to execute dynamic script code and vice versa. .
  • Java EE (Java Platform, Enterprise Edition). This enterprise version of the platform helps developers build and deploy portable, reliable, scalable, and secure Java server applications. Building on the capabilities of Java SE, Java EE provides Web services, component models, remoting, and management APIs for implementing SOA and Web 2.0 enterprise software.
    • Read the articles and for an introductory overview of the features latest version Java EE platforms.
    • Check out the series, a popular framework for building lightweight and robust Java EE applications.
    • For more information about Java EE, see the articles in the .
    • The articles in the Getting Started: Migrating to the Java Platform series were written specifically for developers of .NET, Windows client/server applications, and ASP applications to help them migrate to Java.
  • Java ME (Java Platform, Micro Edition). Java ME provides an environment for running applications built for a wide range of mobile and embedded systems, such as mobile phones, PDAs, set-top boxes, and printers. This edition of the platform provides flexible user interfaces, a robust security model, a full range of built-in networking protocols, and powerful support for online and offline dynamically loaded applications. Applications based on the Java ME specifications can be run on multiple devices and still be able to effectively use their system capabilities.

What technologies are the core components of the Java platform?

The Java section of developerWorks contains the . Listed below are some of the components, possible add-on packages, and extensions included with each edition of the platform. Each technology has a brief description, as well as a link to resources that describe its place in the Java world. Note that many of the components are included with all three editions of the Java platform.

Technologies included in Java SE:

  • Java Foundation Classes (Swing)(JFC) is a set of Java class libraries for creating graphical user interfaces and other graphical features in Java client applications. Management .
  • JavaHelp is a platform-independent, extensible help system that allows developers and technical writers to embed help pages in applets, software components, applications, operating systems, and devices, and to create Web-based help systems. Refer to the article.
  • Thanks to Java Native Interface(JNI) Java applications running inside the JVM can interact with programs and libraries written in other programming languages.
  • Technology Java Web Start simplifies the deployment of Java applications by allowing users to download and run rich software, such as spreadsheets, with a single click, without installation (see article).
  • Java Database Connectivity(JDBC) is an API that provides the means to access most relational data sources from Java applications. It can be used to connect to multiple databases. SQL data, as well as other tabular data sources such as spreadsheets and flat files.
  • Java Advanced Imaging(JAI) is an object-oriented API that provides a simple, high-level programming model that makes it easy to manipulate images.
  • Java Authentication and Authorization Service(JAAS) is a technology that provides services with the means to authenticate users and verify their access rights. It includes a Java implementation of the standard PAM (Pluggable Authentication Module) infrastructure and supports user-level authorization.
  • Java Cryptography Extension(JCE) is a set of packages that provide infrastructure and implementations of algorithms for encryption, key generation and exchange, and Message Authentication Code (MAC). This technology also includes support for symmetric, asymmetric, block and stream ciphers, as well as secure streams and sealed objects. More detailed information can be found in the manual.
  • Java Data Objects(JDO) is a standard Java object persistence abstract model based on interfaces. It allows developers to directly store instances of Java domain classes in persistent storage (such as a database). This model in some cases can replace direct writing to a file, serialization, JDBC, as well as the use of server-side EJB components, both container-managed (Container Managed Persistence - CMP) and self-storing state (Bean Managed Persistence - BMP).
  • Package Java Management Extensions(JMX) provides tools for building distributed, modular, dynamic, and Web-enabled applications for managing and monitoring devices, software, and networks based on service delivery (see article ).
  • Java Media Framework(JMF) allows you to add audio, video, and other media information to Java applications and applets (see the manual).
  • Java Naming and Directory Interface(JNDI) is a unified interface for accessing various naming and directory services on a corporate network. It allows applications to efficiently connect to various naming and directory services in a heterogeneous enterprise environment.
  • Java Secure Socket Extensions(JSSE) is a set of packages for enabling the secure exchange of information on the Internet. They implement the Java version of the SSL (Secure Sockets Layer) and TLS (Transport Layer Security) protocols and provide facilities for data encryption, message integrity checking, server and client authentication (the latter is optional).
  • Java Speech API(JSAPI) includes the JSGF (Java Speech Grammar Format) and JSML (Java Speech Markup Language) specifications. This package provides capabilities for using speech technologies in the user interface. JSAPI is a cross-platform API to support voice command recognition, speech input systems, and speech synthesis. See the next section of the article for more details.
  • Java 3D is an API that provides cross-platform and scalable 3D graphics capabilities in Java applications. The API is organized as a set of object-oriented interfaces that form a single, simple, high-level programming model.
  • Mechanism Metadata Facility Allows developers to define attributes for classes, interfaces, fields, and methods so that they can be treated differently by authoring tools, deployment tools, and third-party libraries at runtime (see ).
  • Java Content Repository API is an API for accessing content repositories in Java SE, regardless of their implementation. Such repositories are high-level information management systems and are extended versions of classical data repositories.
  • Enumerations(enumeration) is a data type that allows you to describe various data elements as a typed set of constants.
  • Generics(generic types) allow you to create classes with parameters ( abstract types) that are specified during the instantiation step. See the article for more details, and also see the article about how generic types make it easy to work with collections in Java SE 6.0.
  • Utilities Concurrency is a set of classes that provide middle-level functionality that is typically required by parallel data processing applications.
  • Java API for XML Processing(JAXP) is an API that allows Java applications to parse and transform XML documents, regardless of the XML processor used. This allows applications to easily switch between different processors without changes in the application code. In turn, the JAXB technology ( Java API for XML Binding) provides capabilities for automating the mapping between XML documents and Java objects.
  • SOAP with Attachments API for Java(SAAJ) provides developers with functions for the formation and processing of messages in accordance with the SOAP 1.1 specification, specifying SOAP with Attachments (SOAP with attachments). See the article for more details).

Technologies included in J2EE:

  • Enterprise JavaBeans(EJB) is a component model that simplifies middleware development by providing services such as transaction management, security, and database connectivity.
  • Portlet specification defines a set of APIs for creating Java portals, covering aspects such as aggregation and presentation of information, personalization and security (see article).
  • javamail is an API that provides a set of abstract classes that model the mail system.
  • Java Message Service(JMS) is an API that supports the creation of portable Java applications based on the messaging mechanism. He defines common set basic programming concepts and strategies for all JMS compliant messaging systems.
  • JavaServer Faces(JSF) provides a programming model that helps you build Web applications by building pages from reusable user interface components, associating those components with data sources and client-side events with server-side handlers. For more information, see the two-part guide and column article series.
  • Java Server Pages(JSP) provides Web developers with the means to quickly create and easily maintain dynamic, cross-platform Web pages that separate user interface and content generation so that designers can change markup without touching the dynamically generated content (see .
  • Standard Tag Library for JavaServer Pages(JSTL) is a set of specialized tags that provide a standard format for performing actions required by many Web applications. Check out Update Your JSP Pages with JSTL and the four-part series called .
  • Java Servlets extend the functionality of Web servers by providing a cross-platform, component-based approach to building Web applications that is free from the performance limitations of CGI.
  • J2EE Connector Architecture(JCA) provides a standard architecture for connecting J2EE applications to heterogeneous enterprise information systems (EIS). This architecture defines a set of scalable and secure transaction-based mechanisms by which EIS providers can provide standard resource adapters for inclusion in an application server. For more information, see the articles and the manual.
  • J2EE Management Specification(JMX) defines the management information model for the J2EE platform. This model has been specifically designed to interoperate with many control systems and protocols. It contains standard tools for comparison with the general information model(Common Information Model - CIM), SNMP Management Information Base (MIB) and object model Java using a resident server component EJB (J2EE Management EJB Component - MEJB).
  • Java Transaction API(JTA) is a high-level implementation and protocol-independent API that provides programs and application servers with the means to access transactions. Java Transaction Service(JTS) defines an implementation of a transaction manager that supports JTA and implements an underlying mapping to the OMG Object Transaction Service (OTS 1.1). Transaction propagation in JTS is implemented using the Inter-ORB protocol (IIOP). See the article for more details.

Technologies included in J2ME:

  • Mobile Information Device Profile(MIDP) is one of two configurations that make up the Java runtime environment for resource-constrained mobile devices. MIDP provides core functionality to applications, including tools for creating user interfaces, connecting to network resources, storing data locally, and managing lifecycle.
  • Connected Device Configuration(CDC) is a standardized framework for building and deploying applications that can be accessed from many networked and embedded devices.
  • Mobile 3D Graphics API for J2ME(M3G) is a lightweight interactive 3D graphics API that is an optional component of J2ME. You can read more about it in a two-part series.

Java Technologies and Web Application Development

For many years, Java has been the main language for developing Web applications. Recently, many frameworks and libraries have appeared to facilitate the creation of Web applications in Java, including rich interactive applications. web applications 2.0.

Check out the Java Web Development topics below.

  • Column articles talk about Grails - a modern infrastructure for creating web applications written in Groovy. Grails allows you to seamlessly combine previously written Java code with the ability to use a flexible and dynamic scripting language. For more information on Groovy, see How does Java relate to dynamic languages ​​below? functional programming?.
  • Ajax is a programming methodology that uses client-side scripting languages ​​to communicate with a Web server, allowing you to quickly update information on pages without having to completely reload them. After reading the series of articles and , you will learn how Ajax can help you as a Java application developer. For more information, see developerWorks.
  • JavaServer Faces (JSF) provides a programming model that helps you build Web applications by assembling pages from reusable user interface components, associating those components with data sources and client-side events with server handlers. For more information, see the two-part guide and column article series.
  • The Eclipse Web Tools Platform (WTP) extends the popular Eclipse development environment by adding tools for building Web applications based on Java EE technologies (see the guide ).
  • DeveloperWorks has many other excellent resources on these topics.

Java technologies, SOA and Web services

Service Oriented Architecture (SOA) is a component model that links functional modules applications (known as Services where did the term come from Web Services) through strictly described interfaces and contracts. Interface definitions are independent of the underlying hardware, operating system, and programming language in which the service is implemented, thereby supporting unified interaction between services that are components of different systems. SOA is an example of loosely coupled program model, which is an alternative to the classic strongly coupled object-oriented models.

Created in this way, Web services allow you to describe business rules and processes in XML, so that applications can interact independently of the platforms and programming languages ​​used. XML technologies promote data portability and make it easier to create messages, while Java technologies make it possible to write portable code. XML and Java go hand in hand, making it the perfect technology pairing for building and deploying Web services.

More detailed information can be obtained by reading the following materials:

  • The developerWorks pages and website will help you navigate these challenging technologies.
  • The articles in this series cover Java Web service frameworks and the new functional layers built on top of these services.
  • This article provides an introduction to the elegant style of Web services design called Representational State Transfer (REST) ​​and explains how to use Java to create REST based Web services.
  • An understanding of JAX-RPC (RPC based on the Java API for working with XML) is essential to building efficient Java Web services.
  • JAX-WS is the obvious next step in the development of JAX-RPC. A practical introduction to this new API is given in the .
  • The series of articles is a guide to Service Component Architecture (SCA) - a specification that describes a model for developing applications and systems based on SOA principles.
  • This article provides an introduction to the Service Data Objects framework. service data) that simplifies the Java EE data model for building SOA applications.

What does Java have to do with dynamic languages ​​and functional programming?

Many developers who start learning Java have a wealth of experience with other programming languages. At the same time, even the most venerable programmers admit that Java is not an ideal language for solving all tasks encountered in practice. Fortunately, with support from the JVM, when developing applications for the Java platform, you can take full advantage of modern dynamic scripting and functional languages. The flexibility and dynamism of these languages ​​proves to be very useful when prototyping and implementing certain types of applications.

You can read more about the possibilities of using dynamic and functional languages ​​on the Java platform in the materials, links to which are given below.

  • The Groovy scripting language allows Java developers to use the most familiar language constructs and libraries, while providing a flexible, dynamic development environment that does not require compilation, simplifies syntax, and supports scripting inside ordinary Java applications. A detailed overview of the possibilities of this language is given in the articles of the series.
  • The new Scripting API in Java SE 6, which is backward compatible with Java SE 5 and contains a small set of interfaces and classes, provides an easy way to call scripts written in dozens of languages ​​from Java code. With it, you can load and call external scripts at runtime, dynamically changing the application's behavior. You can read more about this API in a two-part series called .
  • Are you an ardent supporter of functional programming? Then you should pay attention to the column, which talks about Scala, a programming language for the JVM that combines a functional and object-oriented development approach.
  • VMs have supported alternative programming languages ​​for a long time. In the column articles, you can read about implementations for the JVM in languages ​​such as Rexx, Ruby, JavaScript, Python, and some others.

Java and Free Software Creation

There are countless Java libraries, toolkits, frameworks, programs, and application servers that are open to developers. additional features on using this powerful platform. A number of free technologies have been incorporated into the Java platform over time, and others have remained popular with Java developers over the years, in some cases acting as de facto standards.

  • The Apache Software Foundation(EN) brings together many open projects, most of which are based on Java technologies. Some members of this family of projects are listed below.
    • Apache Struts(EN) is a framework for building Web applications that follow the Model-View-Controller architecture.
    • Apache Shale(EN) is another modern framework for building Web applications, which is a successor to Struts and is based on JSP (JavaServer Pages) technology. An introduction to Shale can be found in the .
    • Apache Ant is the de facto standard for automating the build process of Java applications.
    • The Apache Maven(EN) build tool was designed to meet the needs of today's software projects, which are characterized by dynamic collaboration between development teams and dependency on many independently maintained components (see the guide ).
    • Apache Tomcat is a popular Web container that supports Servlets and Java Server Pages (JSPs).
    • The Apache Geronimo(EN) project is about building a fully spec-compliant Java EE application server based on pure free technology. You can read more about Geronimo in this article, as well as on developerWorks, which has a lot of great content.
    • Apache Derby(EN) is a relational database server implemented entirely in Java. An introduction to Derby is provided in the article.
  • Eclipse(EN) is an open and independent development platform and a set of basic tools for creating software. It is written in Java and provides a plug-in framework that makes it easy to develop, integrate, and use software tools. IBM is a founding member of Eclipse.org and is an active member of the project's governing board and subcommittees. You can read about some component technologies of the Eclipse platform aimed at creating Java applications in the following materials:
    • AspectJ(EN) is an aspect-oriented Java language extension that can be used to modularize end-to-end functionality such as logging or exception handling.
    • The Standard Widget Toolkit(EN) (SWT) is a toolkit that allows you to use the capabilities of the operating system to create user interface elements in an efficient and portable manner.
    • Mylyn(EN) is a powerful job management system for Eclipse users. Detailed guide See articles and formerly known as "Acegi Security for Spring" is a powerful and flexible security solution for enterprise applications built on the Spring framework. It is covered in detail in four articles in the series.
  • Sun Microsystems has also started work on , by launching the following community projects on java.net(EN) :
    • OpenJDK

How to develop Java programming skills?

There are two main ways to develop your Java programming skills: take a special training course (with the possibility of certification) or learn Java on your own by practicing coding. The training courses not only allow you to gain experience from qualified developers, but also give you the opportunity to earn a certification that can convince a potential employer that you have the skills needed to solve the technical challenges we face. In doing so, you will be able to deepen your knowledge in various areas of Java by experimenting on your own and using all available resources. Whichever path you choose, the following resources will help you.

  • Guides and Articles
    • developerWorks has an extensive collection of .
    • Articles in the series and are great for improving your Java skills.
    • Applying design theory to building real-world applications is covered in the articles in the .
    • Experienced Java developers prepackage tools for debugging and testing their applications. DeveloperWorks has several articles in this series of real-time games based on the Eclipse platform for learning Java programming. For an introduction to CodeRuler, see Conquering Medieval Kingdoms with CodeRuler (EN).
  • IBM technical training courses
    • Your attention is invited big choice online, face-to-face and multimedia Java courses developed by IBM Global Services.
  • Certification
    • You can take several exams to earn certifications that demonstrate your Java programming skills. Materials for certification courses can be found at the Java Certification(EN) site.
    • IBM provides opportunities for your skills in Java-related technologies such as building enterprise applications for WebSphere, Rational software, DB2, XML, and SOA.
  • Forums
    • Moderated by experts with decades of experience in Java technology, this is the most interactive way to learn the Java language.

IBM products and technologies for Java developers

IBM is one of the leaders in the practical application of Java technologies. Below are links to some of the IBM products and technologies available to developers of applications for the Java platform.

  • Free downloadable products:
    • (Java Developer Kit) is a set of tools for building and testing applets and applications for Java SE and Java ME on a variety of popular operating systems, including Windows, Linux, and AIX.
    • (IBM Development Package for Eclipse) is an unsupported developer toolkit based on Eclipse that allows you to create and run applications in your own out-of-the-box development environment.
    • : You can download Eclipse free software packages from developerWorks, including the concurrent Calisto and Europa products.
    • is a virtual repository of promising Java technologies developed by IBM. These include APIs, IDEs, development kits, reference implementations, and utilities. Below are links to some of the technologies featured in alphaWorks.
    • . This utility helps to parse and generate testable Ant scripts for building projects developed with Eclipse, Rational and WebSphere IDE for Java EE and SCA platforms.
    • (IBM Pattern Modeling and Analysis Tool for Java Garbage Collector). This utility parses detailed GC trace files, analyzes dynamic memory (heap) usage, and recommends application settings based on memory simulation results. (Secure Shell Library for Java) is a lightweight implementation of the SSH-2 protocol developed by the IETF (Internet Engineering Task Force). It provides secure authentication and other secure services that operate over an insecure network. allows you to consolidate and transform data, thereby increasing the productivity, flexibility and productivity of your business by quickly accessing the information you need.

Top Related Articles