answersLogoWhite

0

Java solves the problem of platform-independence by using

byte code. The Java compiler does not produce native

executable code for a particular machine like a C compiler

would. Instead it produces a special format called byte

code. Java byte code written in hexadecimal, byte by byte,

looks like this:

CA FE BA BE 00 03 00 2D 00 3E 08 00 3B 08 00 01 08 00 20 08

This looks a lot like machine language, but unlike machine

language Java byte code is exactly the same on every

platform. This byte code fragment means the same thing on a

Solaris workstation as it does on a Macintosh PowerBook.

Java programs that have been compiled into byte code still

need an interpreter to execute them on any given platform.

The interpreter reads the byte code and translates it into

the native language of the host machine on the fly. The most

common such interpreter is Sun's program java (with a little

j). Since the byte code is completely platform independent,

only the interpreter and a few native libraries need to be

ported to get Java to run on a new computer or operating

system. The rest of the runtime environment including the

compiler and most of the class libraries are written in Java.

All these pieces, the javac compiler, the java interpreter,

the Java programming language, and more are collectively

referred to as Java.

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

Why java script called as platform independent?

java also called as platform independent.because we will use java application at any operationg system and any hardware. it not contain error. so we called java as platform independent..


Why you are preferring java?

java is platform independent language and open source. java is object oriented language.


Is java fully platform independent?

Java is a platform independent language.After compiling the ".java" file ,that will be converting into the ".class" file,which is a byte code having the capability run on any OS.Basing on the concept byte code java achieving the platform independent,it leads to "Write once run anywhere".


Why java is platform independent explain by diagram?

Java is a platform independent language becoz of the bytecode magic of java. In java, when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.


Why is Java not 100 percent platform independent?

AnswerJava is platform independent while JVM is platform dependent. In Java ,you can compile code in to class file and you can run it in any OS without altering your code.But for interpreting class to bytes we need JVM .so it act as a bridge between your class file and OS. Now a days JVM is available for all OS.So Java attains platform independent.AnswerDepending on your definitions, no language may be truly platform independent. A language like Java needs a virtual machine to run the platform independent bytecode. But this virtual machine must run natively on a given physical machine, which means that the JVM in platform dependent. If someone tells you that Java is not completely platform independent, this is probably what they are referring to.

Related Questions

Why java script called as platform independent?

java also called as platform independent.because we will use java application at any operationg system and any hardware. it not contain error. so we called java as platform independent..


Why java called platform indeependent?

Platform independent language means once compiled you can execute the program on any platform (OS). Java is platform independent. Because the Java compiler converts the source code to bytecode, which is Intermidiate Language. Bytecode can be executed on any platform (OS) using JVM( Java Virtual Machine).


On what platform Java can work?

Java is a platform independent language. It can be used in all platforms. Ex: windows, unix etc.


Why you are preferring java?

java is platform independent language and open source. java is object oriented language.


Why java is platform independent and also prove how it is possible?

WHY MEANS the java is a platform independent language for the sake of it has its own platform to run the program it doesn't require any platforms like c and C++


Is java fully platform independent?

Java is a platform independent language.After compiling the ".java" file ,that will be converting into the ".class" file,which is a byte code having the capability run on any OS.Basing on the concept byte code java achieving the platform independent,it leads to "Write once run anywhere".


Why java is called platform independent not operating system independent?

A "platform" is whatever environment in which Java is running. This includes operating systems. A Java source file on compilation produces an intermediary .class rather than a executable file. This .class file is interpreted by the JVM. Since JVM acts as an intermediary layer.


Why java called as platform independent?

Java is called as platform independent because it uses the WORA(Write Once and Run Anywhere) principle. Java programming language is designed to be run under any OS and that is the main advantage of it.


Why java is platform independent explain by diagram?

Java is a platform independent language becoz of the bytecode magic of java. In java, when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.


Why is Java not 100 percent platform independent?

AnswerJava is platform independent while JVM is platform dependent. In Java ,you can compile code in to class file and you can run it in any OS without altering your code.But for interpreting class to bytes we need JVM .so it act as a bridge between your class file and OS. Now a days JVM is available for all OS.So Java attains platform independent.AnswerDepending on your definitions, no language may be truly platform independent. A language like Java needs a virtual machine to run the platform independent bytecode. But this virtual machine must run natively on a given physical machine, which means that the JVM in platform dependent. If someone tells you that Java is not completely platform independent, this is probably what they are referring to.


Who makes java platform independent?

JVM makes Java Platform Independent.. It loads byte code(.class file) and Run it.


Why JVM is platform independent?

by creating a jre spesific to each platform programmers can confidently write code in any platform and assume it willl also work in aany other. theirfore java is platform independent as bytecode would look the same on any platform, however will be implemented by a diffrent interpreter for each platform.