This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi to all, my doubt is whether the java virtual machine is available in the operating system or as part of the jdk kit. It is said that the jvm is system dependent and the .class files are system independent. for ex:I have two pcs ,where linux runs on one machine and windows on another machine.I have a jdk1.5 kit to install on both of the systems.so does the same jdk1.5 kit works for both the operating systems or i should get some other jdk.
The JVM (Java Virtual Machine) is the engine. The JRE (Java Runtime Environment) is the complete car, including the engine.
The JDK (Java Development Kit) includes the JRE (and JVM) and a bunch of tools that you need when you want to write your own Java programs.
Class files compiled with the Windows JDK run on the JRE on any operating system, you don't need to recompile them. So yes, you can compile your Java source code on Windows and run the class files on Linux (provided you're using the correct JDK/JRE versions).
There is a specific JDK and JRE for each operating system. You cannot use the JDK and JRE for Windows on Linux.