Presentation is loading. Please wait.

Presentation is loading. Please wait.

4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.

Similar presentations


Presentation on theme: "4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel."— Presentation transcript:

1 4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel Young Joel.Young@afit.edu Maj Joel Young

2 Air Force Institute of Technology Electrical and Computer Engineering 4-Nov-152 Object-Oriented Programming Design The Java Environment Java code is compiled to an intermediate form called “bytecode” The bytecode is executed by a simulated computer called the Java Virtual Machine (JVM) The JVM translates bytecode instructions to your machine Java Code Java Compiler Byte Code JVM CPU

3 Air Force Institute of Technology Electrical and Computer Engineering 4-Nov-153 Object-Oriented Programming Design The Java Environment Java maintains its portability by keeping the bytecode the same across all platforms The JVM specification is open so that vendors can write one for their platforms JVMs available from Sun, IBM, Microsoft, and others Byte Code JVM CPU

4 Air Force Institute of Technology Electrical and Computer Engineering 4-Nov-154 Object-Oriented Programming Design Java Programming Environment Sun Microsystems Java Development Kit (JDK) –Available at www.java.sun.com –Latest version is JDK 1.4.2 –Sun refers to all releases after 1.1.8 as “Java 2” –Contains compiler, JVM, and tools Java API Docs: http://java.sun.com/j2se/1.3/docs/api/ Integrated Development Environments –Features include specialized editors, debuggers, GUI builders … but be comfortable with command line first –Recommended – get up to speed fast –Eclipse – IBM – http://www.eclipse.org/ (JDK 1.3), librehttp://www.eclipse.org –DrJava – http://www.drjava.org/, can interface with Eclipse, librehttp://www.drjava.org/ –TogetherSoft – R:\Simulations\TogetherSoft (Academic Version) –JBuilder – www.inprise.com/jbuilder (free version)

5 Air Force Institute of Technology Electrical and Computer Engineering 4-Nov-155 Object-Oriented Programming Design Example Java Program class HelloWorld { static public void main(String args[]) { // About the simplest program you can // you can write in Java // Print “Hello World” to the console System.out.println(“Hello World”); }

6 Air Force Institute of Technology Electrical and Computer Engineering 4-Nov-156 Object-Oriented Programming Design Java Programming Environment Compiling the program javac HelloWorld.java Running the program java HelloWorld CLASSPATH environment variable –Do not define it unless you know what you are doing –If you do define it, ensure you include a period: set CLASSPATH=.;c:\java;


Download ppt "4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel."

Similar presentations


Ads by Google