Java машина for windows

Виртуальная машина Java

В этой статье мы расскажем, что такое виртуальная машина Java и как её установить.

Что такое виртуальная машина Java и для чего она нужна

Виртуальная машина Java (JVM) — это ключевой компонент платформы Java. С её помощью можно запускать программы Java и продукты, написанные с применением байт-кода. А также она помогает управлять ресурсами программ во время их выполнения.

Перед тем как мы будем подробнее рассматривать виртуальную машину, разберем, что такое байт-код.

Сам по себе процессор — это сложный калькулятор. У него есть множество ячеек памяти, между которыми проводятся различные математические и байтовые операции. Как проводить каждую операцию, какой будет последовательность действий и какие данные нужны для операции ― всё это записано в машинном коде. Машинный код — это единственный язык, который понимает процессор любого компьютера.

Если бы все процессоры работали с помощью одинаковых машинных кодов, при разработке программ не нужно было подстраиваться под каждую систему. Достаточно было бы выучить один «машинный язык» и с его помощью удалось бы общаться со всеми процессорами. Однако в реальности процессоры «говорят» на разных языках. Языки могут отличаться:

  • архитектурой CISC и RISC,
  • длиной команд,
  • режимом адресации,
  • сложностью кодировок инструкций.

Из-за этих различий программы, созданные для одной архитектуры (или одного поколения процессоров), не работают на другой. Поэтому разработчикам приходится перекомпилировать программы для работы на других компьютерах.

Чтобы решить эту проблему, был создан байт-код — своеобразный промежуточный код между машинными языками. Прочитать байт-код может виртуальная машина Java.

Когда вы запускаете приложение Java на компьютере, байт-код программы попадает на JVM. Интерпретатор в виртуальной машине компилирует байт-код программы в понятный для процессора машинный код. Таким образом, одна программа, созданная на Java, может открываться на разных процессорах.

Как установить виртуальную машину Java

Существует два продукта, с помощью которых можно создать ВМ:

  • Java Runtime Environment (JRE) ― виртуальная машина и API. Подходит, если вы хотите использовать готовые программы на Java.
  • Java Development Kit (JDK) ― виртуальная машина, API и средства разработки программ на Java. Нужна тем, кто планирует писать свои Java-программы.
Читайте также:  Python set сохранение порядка

Как установить JRE

Чаще всего JRE уже есть на многих устройствах. Поэтому перед тем как устанавливать JRE проверьте, есть ли она на устройстве. Для этого зайдите в терминал и введите команду:

Команда для всех операционных систем одинаковая. Если на вашем устройстве установлена Java, перед вами появится сообщение о версии программы:

Как проверить версию Java

Если нет, то в сообщение будет ошибка или система скажет, что не знает такой команды. В таком случае вам понадобится установить JRE самостоятельно.

Установка ВМ на разных операционных системах похожа. В качестве примера покажем установку на macOS.

Как установить Java 1

В зависимости от вашей операционной системы загрузите установочный файл с официального сайта. Например, если вам нужна виртуальная машина Java для Windows 10 x64, выберите пункт, показанный на картинке ниже:

Как установить Java 2

Откройте папку со скачанным файлом и дважды кликните по нему:

Как установить Java 3

Так как файл скачан из интернета, система попросит у вас разрешение на установку:

Как установить Java 4

Затем система попросит ввести пароль пользователя. Введите его и нажмите OK:

Как установить Java 5

Нажмите Install:

Готово, вы установили Java.

Как установить JDK

Как установить Java JDK 1

Запустите установку:

Как установить Java JDK 2

Нажмите Продолжить:

Как установить Java JDK 3

Нажмите Установить:

Как установить Java JDK 4

Готово, программа установлена. Нажмите Закрыть:

Источник

Java Virtual Machine (JVM) Download & Install for Windows 10/8/7

What is a Java Virtual Machine? A lot of users are confused about it and don’t know where to get the Java Virtual Machine download pack. In this post, MiniTool will explain the definition of JVM and provide a full download/install guide.

Java, developed by Oracle Corporation, is one of the most popular programming languages that is widely used for desktop computers, android development, games, and other development tasks. However, many users find there are different components of the Java program like JRE, JDK, and JVM.

What is JVM? Is JVM the same as JDK and JRE? How to download and install Java Virtual Machine for Windows 10/8/7? Keep reading the content below.

Читайте также:  Таблица

Notepad++ Download/Install for Windows 10/8/7 [32-bit & 64-bit]

Where to find the Notepad++ download package? How to install Notepad++ for Windows 10/8/7 PCs? Now, this post will explain all these questions in detail.

What Is a Java Virtual Machine (JVM)

Java Virtual Machine, also known as JVM, is a virtual environment that allows a computer to run Java programs written in other programming languages that are translated to Java bytecode. That is to say, JVM works as an interpreter that can load, verify, and executes Java bytecode.

In addition, JVM is also responsible for converting Java bytecode to machine-specific code. In addition, it is platform-dependent and can perform many tasks like memory management and security. Java Virtual Machine mainly consists of the following 3 components or subsystems.

  • Runtime Data Areas: It is responsible for providing memory to store bytecode, objects, parameters, local variables, return values, and intermediate results of computations. It mainly contains PC register sets, method areas, stack areas, and threads.
  • Class Loader Subsystem: It is an essential core of the JVM and can be used for loading/reading/linking the “. Class” files and saving the Java bytecode in the JVM method area.
  • Execution Engine: It is the central component of the JVM and can communicate with various memory areas of the JVM. It executes the bytecode assigned to the Runtime Data Areas in JVM via the Class Loader.

What is JVM? Now, I believe that you already have known the answer. Let’s see where to get the Java Virtual Machine download pack.

Is JVM the Same as JRE and JDK

Is JVM the same as JRE and JDK? A lot of users are confused about the difference between JRE vs JDK vs JVM. JRE (Java Runtime Environment) is a software distribution that provides an environment for a Java program or app using the Java command. It is mainly used for those who only want to execute Java programs that are end-users of the system.

JDK is short for Java Development Kit which is a software development environment used for developing and executing Java programs, while JVM is responsible for loading, verifying, and executing Java bytecode. In addition, JVM is necessary for both JDK and JRE and Java programs won’t run without it. If the JVM component of Java programs gets corrupted or missing, you may encounter some errors like “a Java Virtual Machine is required” and “Minecraft could not create the java virtual machine”.

Читайте также:  Программист java работа в сша

NET Framework 3.0 Download & Install for Windows | Get It Now

What is NET Framework 3.0? Where to download NET Framework 3.0? How to install it for Windows? This post will explain these questions for you in detail.

Java Virtual Machine Download & Install for Windows 10/8/7

How to get the Java Virtual Machine downloaded and installed for Windows 10/8/7. Although Oracle doesn’t provide a single Java Virtual Machine installer, the JVM installation package is included in JDK or Java downloads.

So, you can download the Java Virtual Machine installer by getting the Java JDK package from Oracle. For that:

Step 1. Click here to open the Oracle Java Downloads page, and navigate to the Windows tab. There are 3 links to JDK installers and you can select one according to your need.

select a JDK installer to download

Step 2. Once downloaded, double-click the JDK executable file and click on Yes to run it.

Step 3. Click on Next and follow the on-screen prompt to complete the JVM installation.

install Java JDK

Further reading: If you encounter some issues like the C drive full when installing the program, MiniTool Partition Wizard can help you fix them easily. Moreover, you can use it to extend/resize/format partition, convert a disk to MBR/GPT, migrate OS, etc.

About The Author

Ariel has been working as a highly professional computer-relevant technology editor at MiniTool for many years. She has a strong passion for researching all knowledge related to the computer’s disk, partition, and Windows OS. Up till now, she has finished thousands of articles covering a broad range of topics and helped lots of users fix various problems. She focuses on the fields of disk management, OS backup, and PDF editing and provides her readers with insightful and informative content.

Источник

Оцените статью