-
Can anyone pls explain me what is JVM(Java virtual machine)? What are JSR and their significance?0
-
Member • Aug 11, 2010
Hello vijay,
I think you must know about c++ execution file that is ".exe".
Our window operating system designed in such a way that it support ".exe" file.
.
Now move to java, java create a ".class" file that is not supported by your window operating system.
To understand this just paste a ".class" file on Desktop of the system in which jvm is not installed.
You must find that the unsupported file icon is appierd on your file.
Now installed a jvm and then look you must found a cup like icon on your file.
.
Actually jvm working is same as that of operating system in c++.
In the case of c++ it's an operating system work to read a ".exe" file.
But in case of java that platform is provided by your jvm.
.
.......One more thing i must add that java does not create any ".exe" file java creates a .class file that is supported by your java virtual machine and you must have to interprete them in oredr to run them on any machine that is why java is also called an interpreted language.
;-);-);-)Are you sure? This action cannot be undone. -
Member • Aug 11, 2010
When you compile a java program then it checks the syntax and semantics and a .class file is prepared where your java file is saved now the role of JVM comes into play. JVM is a interpreter which interpret the .class file(bytecode) and provide its executable file.
JVM is responsible for the java portability and make it platform independent reason is that you only need JVM is to be implemented for each platform.
The trouble/limitation with the c or c++ programming was that it is designed to be compiled for a specific target and not platform independent means that suppose you have to one system with Windows OS and intel processor and another system is with unix OS and AMD processor so it is very tedious task to make compiler for different platform then the concept of java is introduced and in which JVM makes the java completely platform independent.This is the primary aim for the development of the java programming language.Later on, most of the users stick to the windows OS then its and important features takes place i.e its web application.
JVM has the three major component:
1>class loader:- it is used to load the class file, which are required by the program running on the memory.The class file is loaded dynamically when required.
2>Execution Engine:-It is used to run the Bytecode(.class file) line after another.IT converts the bytecode to the machine object code nad run it.
3>JIT compiler:-This concept is released with the Java 2(version 1.2) .It compiles the bytecode into executable code.Are you sure? This action cannot be undone. -
Member • Aug 11, 2010
Thanks a lot sushant and Mohit for ur information. Can u just explain me about JSRs? U can even share some web links or material related to that.Are you sure? This action cannot be undone. -
Member • Aug 11, 2010
oh!!
Sorry i didn't notice your second question...actually JSR stands for Java Specification Request... as you can understand from the name ,, it is a formal way to request changes in the languages or the technology in general. However you need to have a JSPA
agreement for your requests to be noticed/ read...this is charegeable.Are you sure? This action cannot be undone. -
Member • Aug 11, 2010
I thin I need more info abt it.. Can u guide me some web links where I can get more info abt it? I am doing testing on mobiles. I need to know which JSRs will support what features.,Are you sure? This action cannot be undone. -
Member • Aug 12, 2010
Rightly said by mohit and sushant but i would like to add more to it
JVM can also be use to implement programming language other than java. For example, Ada source code can be compiled to Java bytecode, which may then be executed by a JVM
Programs intended to run on a JVM must be compiled into a standardized portable binary format, which typically comes in the form of .class files. A program may consist of many classes in different files. For easier distribution of large programs, multiple class files may be packaged together in a .jar file (short for Java archive).
The JVM runtime executes .class or .jar files,Are you sure? This action cannot be undone. -
Member • Aug 12, 2010
one more thing engineers...
jvm is plateform dependent. it can be executed only on windows os because its setup file is .exe type..then how can we use java on linux operating system?
because linux doesn't hav .exe as its setup?Are you sure? This action cannot be undone. -
Member • Aug 12, 2010
Himanshu !!!!
as far as i know JVM(java virtual machine)is not platform dependent rather its platform independent. it can have its effect on linux as well
if i am wrong then please let me knowAre you sure? This action cannot be undone. -
Member • Aug 12, 2010
No no anand jvm is not plateform independent ......jvm provide such like a plateform that makes java plateform independent.anandkumarjhaHimanshu !!!!
as far as i know JVM(java virtual machine)is not platform dependent rather its platform independent. it can have its effect on linux as well
if i am wrong then please let me know
......so java is plateform independent ...not jvm.
;-);-);-)Are you sure? This action cannot be undone. -
Member • Aug 12, 2010
Thank you mohit for correcting me but then i have one doubt in my mind that as asked by himanshu how can jvm work on linux as linux does not support .exe file extension?Are you sure? This action cannot be undone. -
Member • Aug 12, 2010
Hi Himanshu!HImanshu_Sharmaone more thing engineers...
jvm is plateform dependent. it can be executed only on windows os because its setup file is .exe type..then how can we use java on linux operating system?
because linux doesn't hav .exe as its setup?
What you have said that JVM is platform dependent its not true JVM cannot be platform dependent it is the only concept which makes the java platform independent.......for more details please read my previous post...........Are you sure? This action cannot be undone. -
Member • Aug 12, 2010
hi anand, let me explain you,anandkumarjhaThank you mohit for correcting me but then i have one doubt in my mind that as asked by himanshu how can jvm work on linux as linux does not support .exe file extension?
first JVM is an interpreter which executes the .class file and when we compile our java program it will first make a .class file which is not our final executable file.It shows that .class is portable all we just need an interpreter(JVM) in our system or in any other system which is used to interpret that .class file and produce the final result..
Again all we need that we must have JVM installed in our system whether it is winOS or UNIX OS....
i think you all haven't read my previous post carefully....please read it and then if you have any doubt then ask.........Are you sure? This action cannot be undone. -
Member • Aug 13, 2010
then we can run it on linux operating system?sushant005Hi Himanshu!
What you have said that JVM is platform dependent its not true JVM cannot be platform dependent it is the only concept which makes the java platform independent.......for more details please read my previous post...........
its execution file is .exe and linux operating system doesn't have .exe extension,so how it is possible?Are you sure? This action cannot be undone. -
Member • Aug 13, 2010
Sure you can run in Linux environment.HImanshu_Sharmathen we can run it on linux operating system?
its execution file is .exe and linux operating system doesn't have .exe extension,so how it is possible?
You need to have JDK(Java Development Kit) installed in your system.Write program and save it and run...it will work fine...
.exe file executable file supported by windows OS and .exe is not supported by linux OS that is one of the reason why JVM is introduced. All you need to have JDK installed in the system where you want to run your java program whether it is Unix OS,Windows OS or Mac OS,or any other...
Again i am explaining you Java program is compiled to give the .class file which is a portable file, i mean to say you can run that .class file in any OS but you must have JVM installed on that system.And now the task of JVM is that it will run .class file and provides us the required output.
Any doubt feel free to ask...Are you sure? This action cannot be undone. -
Member • Aug 15, 2010
ok shushank i know it is portablesushant005Sure you can run in Linux environment.
You need to have JDK(Java Development Kit) installed in your system.Write program and save it and run...it will work fine...
.exe file executable file supported by windows OS and .exe is not supported by linux OS that is one of the reason why JVM is introduced. All you need to have JDK installed in the system where you want to run your java program whether it is Unix OS,Windows OS or Mac OS,or any other...
Again i am explaining you Java program is compiled to give the .class file which is a portable file, i mean to say you can run that .class file in any OS but you must have JVM installed on that system.And now the task of JVM is that it will run .class file and provides us the required output.
Any doubt feel free to ask...Are you sure? This action cannot be undone.