A
A
Alan2022-03-23 12:31:02
Java
Alan, 2022-03-23 12:31:02

Does the user need to have a JVM to run a Java program?

I am new to Java. I just started learning this programming language and found out that Java programs are compiled into bytecode, which is executed by the Java Virtual Machine (JVM). But if a user (for example, Windows) does not have a JVM installed, will he be able to run the program? Or will he have to go to the Oracle website, download Java, and then run my Java program?
Sorry if this is a dumb question, but I just started learning Java.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Michael, 2022-03-23
@Akela_wolf

Yes, sure. Therefore, some Java programs are distributed as an installer, which immediately installs the JVM along with the program (and often in the program folder). For example, JetBrains IDEA does this.

A
Aren Yelchinyan, 2022-03-23
@zelenie_pelimeni

Yes, JVM is required for java. But there are also compilers for java, although I don’t understand why this is needed at all. Although see for yourself:
OS in Java

4
4auka DomamaN, 2022-03-23
@dmn_202_01

In the case of compiling a program without an installer (to a jar file, for example), the user will need to have a jvm to run it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question