Are different OS JRE's different?

2.3k views Asked by At

I am questioning to myself if JRE's from different OS's (For example; Windows, Linux, Mac, etc) are all different and platform dependent? The reason I ask this is because if Java Bytecode is platform independent, that means that a JRE for a certain OS must implement the same bytecode, a bit differently specifically catered to the OS right? Thanks in advance.

3

There are 3 answers

1
Jose On BEST ANSWER

The Java Runtime Environment (JRE) is platform dependent; although, they do run the same Java Bytecode.

0
King Dedede On

The JREs are both platform and architecture-specific, but the bytecode and JVM function identically between all platforms (there is still a difference between architectures x86 and x64)

0
Mr.Q On

JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment it provides JVM +libraries (which are needed by jvm), and other components to run applets and applications written in Java.

The Java Virtual machine (JVM) is the virtual machine that run the Java bytecodes. The JVM doesn't understand Java source code, that's why you compile your *.java files to obtain *.class files that contain the bytecodes understandable by the JVM. so you write your code once (generate .class files) and run it on diffrent JVMs. There are specific implementations of the JVM for different systems (Windows, Linux..). JVM dose theses tasks Loading classes, Verifying code, Executin code and Providing runtime environment.

There is also another term called JDK which consist of JRE + development tools.