Answer the question
In order to leave comments, you need to log in
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
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.
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
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 questionAsk a Question
731 491 924 answers to any question