Why doesn't Java run on all platforms?

If Java is platform independent, why doesn't it run on all platforms?

Java runs mostly on all platforms. For running a Java program we need JVM on all the platforms. If JVM is not installed on any platform than we are not able to run Java programs. Java API has standard library and API that can run on any platform. But the API of different languages like C and C++ is different for different platforms. The API for Windows is totally different than the API for Linux, and the API for Mac OS X is totally different again. When you write a C or C++ program that uses the Windows API, then your source code will be largely useless on a Linux system or on a Mac - because the Windows API doesn't exist there. So we can run Java programs on any platform but before this we have to install JVM for interpreting the byte code. The byte code of Java or war or jar files can be taken to any platform and can be run directly on the platform having JVM.
Access native OS calls from a Java program
To access native operating system calls from my Java program JNI is used. Java native Interface (JNI) is a programming framework that allows Java code...
How do we create and use sockets in Java?
A socket is a software endpoint that establishes communication between a server program and one or more client programs...
Send data from a Java program to CGI program
There are two methods of sending data from Java program to a CGI Program: a.) The first method is that we can use CGI scripting on both client and server by using...
Post your comment