Yes, what you heard is right “Java a platform dependent Technology”. I will give you the clarity
Remember these 3 files “file.java -> file.class -> file.exe”.
Everyone knows that java compiler compiles “file.java” and generates “file.class” if JVM runs then file.class turns to machine level language than the program executes. But the fact is when you move the .exe file to another machine it won’t possible because within milliseconds it will create execute and destroy. So we have the option to move the .class file one system to another system so that we can run the class file on another machine.
Java a platform dependent Technology is True but JVM is platform independent. means every computer manufacture create a JVM for a particular operating system that converts the bytecode file to machine executable file. its pretty simple to the configuration.
In this article, you are going to see the most important topic of Java. which is a platform, platform dependency, and platform independence.
Platform: in Single word platform is nothing but Operating System.
.Java when we Run the Java Code we will get a.Class File
.class file Generated at one operating system can we executable at another operating system, then that language called as platform independent.
Platform Dependent: .class file Generated at one operating system can not executable at another operating system, then that language called as Platform Dependent.
Platform Independent: .class file Generated at one operating system can we executable at another operating system, then that language called as platform independent.
You can get a Question that, why.class file needs to move from one system to another system we can give the .java file Right .? The fact is, No one will give you source code to the client, they give the source code to the client, then the client can modify something and give/sell that application to others.
I would like a real-time story most of the people criticise java(those are from C/C++ background). They say Java a platform dependent Technology similar like C/C++, JVM is platform independent.
Source: Praveen Goud – Naresh Technologies Hyderabad.