Sobes.tech
Junior — Middle

Is it possible to run a Java program using only JRE without installing JDK?

sobes.tech AI

Answer from AI

Yes, to run a Java program, only the JRE (Java Runtime Environment) is needed. The JRE includes the virtual machine (JVM), standard libraries, and components necessary to run Java applications.

The JDK (Java Development Kit) includes the JRE and additional development tools such as the javac compiler, debugger, and other utilities.

If you already have a compiled .class or .jar file, only the JRE is required to run it. Installing the JDK is only necessary if you plan to compile or develop Java code.

Example of running:

java -jar myapp.jar

This run is possible with only the JRE.

Is it possible to run a Java program using only JRE… - sobes.tech