1 / 17

Introduction to Java

Learn about the history of Java and its evolution from an intelligent consumer-electronic device language to a tool for creating web pages with dynamic content. Discover how Java is now used to develop large-scale enterprise applications, enhance server functionality, and provide applications for consumer devices.

hugley
Download Presentation

Introduction to Java

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. 1 • Introduction to Java

  2. History of Java • Java • Originally for intelligent consumer-electronic devices • Then used for creating Web pages with dynamic content • Now also used to: • Develop large-scale enterprise applications • Enhance WWW server functionality • Provide applications for consumer devices (cell phones, etc.)

  3. Java Class Libraries • Classes • Include methods that perform tasks • Return information after task completion • Used to build Java programs • Java provides class libraries • Known as Java APIs (Application Programming Interfaces)

  4. FORTRAN, COBOL, Pascal and Ada • FORTRAN • FORmula TRANslator • COBOL • COmmon Business Oriented Language • Pascal • Structured programming • Ada • Multitasking

  5. BASIC, Visual Basic, Visual C++, C# and .NET • BASIC • Beginner’s All-Purpose Symbolic Instruction Code • .NET • .NET platform • Visual Basic .NET • Based on BASIC • Visual C++ • Based on C++ • C# • Based on C++ and Java

  6. Typical Java Development Environment • Java programs normally undergo five phases • Edit • Programmer writes program (and stores program on disk) • Compile • Compiler creates bytecodes from program • Load • Class loader stores bytecodes in memory • Verify • Bytecode Verifier confirms bytecodes do not violate security restrictions • Execute • JVM translates bytecodes into machine language

  7. Fig. 1.1 Typical Java development environment.

  8. Creating a Program with JCreator • Click on the JCreator Icon • IDE windowappears

  9. Creating a Program with JCreator • Click on File, New, then Project • Project Wizard appears • Choose Java Application template

  10. Creating a Program with JCreator • Give the project a name • Then click Next

  11. At this point you can click on Finish Creating a Program with JCreator • You will want the JDK version 1.5 • This tab is where you can specify hsa library

  12. For now, you can proceed with Finish The Class Wizard appears. Specify a name for the class and make sure Public is chosen Creating a Program with JCreator • Now we create our class (the program) with File, New, and Class

  13. Creating a Program with JCreator • The wizard creates a template. • Now complete the program with the required commands.

  14. Build Output shows in bottom pane. This is where compiler error messages will be displayed. Creating a Program with JCreator • Run the compiler with Build, and CompileFile

  15. Creating a Program with JCreator • To run the compiled program click on Build, and ExecuteFile • Program runs in separate window Without Creating a Project

  16. View Flash Presentations • Creating a workspace, project, and application • Writing, compiling, running an application

  17. 1 • Introduction to Java

More Related