Please answer me

@raghwagh (1527)
India
February 19, 2007 7:30am CST
Can we compile a java program if we dont have JVM installed on our PC but we have just the javac.exe file. On similar line can we run a java program using java with no JVM installed on Pc. Also can I create a java class without installing JDK on my PC.I think similar questions are asked in interviews also. Please give your answers.
1 person likes this
2 responses
@ashraf7 (851)
• India
21 Feb 07
We can run java without JVM but we cant run without JDK.
1 person likes this
@raghwagh (1527)
• India
22 Feb 07
I think so for running java we will require JVM as it is the envirooonment in which java runs.
• India
1 Mar 07
That is correct.
1 person likes this
• India
20 Feb 07
We can compile a java program even we don't have an JVM on our PC...because JVM is an java runtime environment..which is used to run the class file generated by javac.exe..i.e., class file that is generated is an platform independent file...Now JVM will convert that class file into an platform dependant file...so to run a java program we need JVM.which implies JVM is compulsory inorder to run the java program. Without JDK_HOME... i mean jdk installed ..we cannot compile the java file
@raghwagh (1527)
• India
20 Feb 07
Thanks for the reply.You have correctly said it.
• India
21 Feb 07
Friend ...don't forget to rate my answer's Thanking You...
1 person likes this