Can you support java is platform independent?.

     VC++ exe file needs Win to run,
     JAVA Byte code needs interpreter to run.

   In both cases we need extra software support then how Case 2 is advantageous?.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

g_senthilkumarConnect With a Mentor Commented:
  After the compilation,you will get class files in Java which is nothing but byte code.This byte code is suitable for any platform.Once you have a byte code you can run that code in any platform provided JVM for that platform needed.
   JVM can be embedded in OS,browser.So whenever you are executing the java program JVM will be embedded into your OS and it will start the execution.First it will convert the bytecode into native machine instruction then it will run.Thats what java is very slow compared to C,C++.
  I  think when you have exe of C++ program which you created in windows cannot run on other OS.But in java if you have the byte code you can run it on any platform which should have JVM.
   I hope this cleared your doubt.
Win is O/S, which is the "platform". :-}
The interesting thing about Java is that you don't need a whole operating system to run it. And, to underscore that, the JVM (the byte code interpreter) has been ported or recreated for numerous systems. It's not perfect (yet), but by and large a Java applet will load and run on any machine with a browser.

So while a VC++ program will only run on a windows machine, a Java program can run on windows, ce, linux, unix, mac, palm top, etc. etc. The potential number of targettable machines is much higher for a Java program.
Also, java doesn't need an actual, full OS...bytecode can run on a TV, refrigerator, etc.
I'm currently working on application for GPS systems, and I test it on my computer! Because it will work the same on their hardware as on mine!
All Courses

From novice to tech pro — start learning today.