3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs JVM Java APIs Java Application
3/5/2002e-business and Information Systems2 Java APIs Client-Side applications Server-Side applications Client/Server applications Internet (Web) applications
3/5/2002e-business and Information Systems3 JAVA Compiler Java Compiler Source Code Java Byte Code Readable by human Executable by JVM javac
3/5/2002e-business and Information Systems4 JAVA Virtual Machine (JVM) JVM - JRE Java Byte Code Executable by JVM java JVM for Windows HP OS Windows OS Linux OS Mac OS JVM for Linux JVM for HP JVM for Mac interpreter
3/5/2002e-business and Information Systems5 Java Software Development Kit Download and install: SDK 1.3 or higher Commands in bin directory: javac – java compiler java - execution jar – java zip/tar
3/5/2002e-business and Information Systems6 Java Example: Source Code //File: HelloWorld.java import java.io.*; public class HelloWorld { public static void main(String[] args){ System.out.println("Hello World!"); } //End of main } //End of class
3/5/2002e-business and Information Systems7 Java Example: Generate Byte Code Source Code: HelloWorld.java Set Path: set path=c:\sdk1.3\bin;%path% Compile: javac HelloWorld.java Byte code: HelloWorld.class
3/5/2002e-business and Information Systems8 Java Example: Execute ByteCode java HelloWorld
3/5/2002e-business and Information Systems9 Java Example: Windows98 - DOS