• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. HAVi > HAVI AND JAVA

HAVI AND JAVA

HAVi has specified the Java programming language for the development of DCMs and applications for in-home appliances. To understand the benefits of using Java applications on a home network, it is necessary that we take a quick look at the programming language itself. The Java language is extremely powerful and incorporates many of the benefits of the C and C++ languages. Java is highly object-oriented—everything in the language is an object, apart from the simple data types. Unlike C++, which is an object-oriented derivative of the C programming language, Java was designed from the ground up using object-oriented technologies. Virtually everything in Java is an object, which makes the Java computing model easy to extend. To complement the various objects, the language also contains a variety of data types, which have been categorized into numeric, character, or Boolean data types. When we speak about data types, we are talking about the classification of a particular type of information. The Java environment comes with a rich collection of classes that deal with standard computing functions such as I/O, networking, and graphics. Programs written in the Java programming language are platform-independent. When a program is first written, the source code is compiled into a language that is very similar to machine instructions called bytecode. The main difference between bytecode and machine code is that bytecode is not specific to any particular processor. The use of bytecode allows software engineers to write once and execute the program on a variety of different platforms, including network computers, thermostats, mobile phones, VCRs, toasters, and digital set-top boxes.

Once the program has been translated into bytecode, it can be transferred across the HAVi-based home network and executed by a Java virtual machine. Bytecode files are easily recognized by their .class file extensions. Java is a secure language because the virtual machine verifies the bytecode before executing the program. In addition to verifying the integrity of bytecode, the Java program is unable to access system resources such as hard disk drives. Not all categories of HAVi appliances are able to run havlets, DCMs, and applications that are written in Java bytecode. All FAVs support the uploading and execution of Java bytecode because it supports a Java virtual machine on which these entities can run. Consequently, Java applications can be executed on any FAV from any vendor or brand and anyone can write Java applications for FAVs, not just the vendor of the FAV. The ability to install Java applications on any FAV offers the following benefits:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint