90 likes | 435 Views
Cross-platform. Define Platform. A machine+Operating System(OS)=Platfom PC+Window XP = platform PC+Window 3.1= platform PDA+Palm OS =platform. The meaning of cross-platform. In software platform, refer to the program that can run on more than one type of operating system .
E N D
Define Platform • A machine+Operating System(OS)=Platfom • PC+Window XP = platform • PC+Window 3.1= platform • PDA+Palm OS =platform
The meaning of cross-platform • In software platform, refer to the program that can run on more than one type of operating system. (e.g Windows/MAC OS/Unix/Linux ) • In hardware platform, refer to the program that can run on more than one type of hardware (e.g Intel and AMD, PC and MAC)
Machine-independent Programming • A programming language that can run on different platforms is called machine independent or portable. **be reminded: “different platforms” means different O.S. and/or hardware
Java • Can run on any operating system with an appropriate(適當的) Java Virtual Machine(JVM) software(called Write-Once-Run-Anywhere technology) that ensure the software developed with Java is cross-platforming. • Most platforms have its own JVM.
Bytecode • Is an intermediate language that is executed by an interpreter(翻譯程式) called virtual machine. • Virtual machine converts bytecodes into machine codes that the computer can understand.
With a programming language that produces bytecodes and a virtual machine for each platform ,source programs can be compiled(轉化成機器語言) into bytecodes once and are then able to run any platforms.
With the machine-independent languages and the virtual machine software,programmers can develop applications which run on many different platforms.However,since the virtual machines have to translate the bytecodes into machine instructions,bytecode application is run slower than executable programs.