Why Java Platform Independent?

E-mail applications
Microsoft Exchange
Web services
I don't find the exact reason why Java is called Platform independent. I have read it in many books. Still a practical overview is not there. Please Specify in more detailed.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Because you don’t need to apply any changes to code when you port it (move over) from say, Windows XP to Linux machine.

For example, we develope code on our WinXP based workstations, test and debug it under WS Ap.Developer, then load it (source code) into PVCS, compile under Linux and deploy on the HOST server that run under AIX.

So, the same code without changing no line works in all three environments – Windows, Linux, AIX (Unix from IBM)

Discuss This Question: 4  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TedNYC
    The java code is platform-independent, but each platform has a java machine which translates and executes the java code for use that platform.
    0 pointsBadges:
  • Ysrd
    Each platform has a JRE Java Runtime Environment That provides a platform native to each type of computer or programmable device. This JRE then takes the java code and (most people don't like this bit) interprets it and then runs it on the computer. The JRE allows the write once run anywhere because it gives a piece of 'middle ware' that sits between the code and the computer. This middleware is not the same on all computers as it has to talk to the cpou and chipset of the system it will run on but effectively provides a common interface on each system thus making the code abstracted from the cpu.
    440 pointsBadges:
  • Ashish2
    Java is platform independent because of its generation of intermediate byte code. As the byte can be known by all platforms or computers you are no need to install any settings for it. It automatically gets executed when it is loaded.
    105 pointsBadges:
  • AshishSingh10

    The Java platform / runtime environment is platform independent in the sense that the same libraries (images, networking, File IO etc.) are available and work in the same way on all platforms. This is done deliberately in order to allow applications that use these libraries to be able to run on any platform. For example, the Java libraries that access the filesystem know the fact that Windows and Linux use different filename path separators, and take account of this for you. Of course, this means that under the hood the runtime environment does make use of platform-specific features, so you need a different JRE for each platform.

    Thanks and regards
    1,330 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: