1 / 6

Object-Oriented Programming Design Topic 1: The Java Environment

Object-Oriented Programming Design Topic 1: The Java Environment. Maj Joel Young Joel.Young@afit.edu. Maj Joel Young. The Java Environment. Java Compiler. JVM. Java Code. Byte Code. CPU. Java code is compiled to an intermediate form called “bytecode”

arion
Download Presentation

Object-Oriented Programming Design Topic 1: The Java Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. The Java Environment Java Compiler JVM Java Code Byte Code CPU • 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

  3. The Java Environment JVM Byte Code CPU • 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

  4. 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), libre • DrJava – http://www.drjava.org/, can interface with Eclipse, libre • TogetherSoft – R:\Simulations\TogetherSoft (Academic Version) • JBuilder – www.inprise.com/jbuilder (free version)

  5. 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. Java Programming Environment • Compiling the programjavac HelloWorld.java • Running the programjava 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;

More Related