1 / 38

Outline

Outline. -- Massimo Sartori, MSc (PhD Student) Intelligent Autonomous Systems Laboratory (IAS-LAb) Department of Information Engineering, University of Padua Via dei Gradenigo, 35131-IT Tel. +39-049-827-7833 mail: sartori1@dei.unipd.it. Outline.

tracey
Download Presentation

Outline

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. Outline -- Massimo Sartori, MSc (PhD Student) Intelligent Autonomous Systems Laboratory (IAS-LAb) Department of Information Engineering, University of Padua Via dei Gradenigo, 35131-IT Tel. +39-049-827-7833 mail: sartori1@dei.unipd.it

  2. Outline • Very Short Introduction to Operating Systems • Introduction to Java and Object-Oriented Programming • Installing Java • Programming Java for Windows • Programming Java for Linux

  3. Operating Systems • It controls the execution of applications • It’s in between the User and the Hardware • It facilitates the use of a machine • software development • programs execution • I/O devices access • fault management • It optimizes the execution of resources • processor (multitasking, scheduler) • memory (paging, virtual memory) • I/O devices (files, I/O buffering)

  4. File System • All Operating Systems allowaccess to files stored on disks • Computers store data on disks using files • It makes disk memories easier to be used • Different Operating Systems  Different File Systems  Different ways of storing data on the disks.

  5. Root Primo Livello Secondo Livello

  6. File System block • Hard-Disks are organized in several blocks • Each file is distributed in a set of blocks File

  7. Java Programming Language • Object-oriented Programming Language (Sun Microsystem, 1995) • Derived from C/C++ • Java applications runs on a Java Virtual Machine regardless of • computer architecture • Good for computer networks and internet

  8. J-Object-Oriented Programming • Trace its roots to the ‘60s • Software became increasingly complex, quality was often compromised • Object-oriented programming was deployed to maintain quality in software • Traditional Programming: A program is a group of tasks (subroutines) to compute • Object-Oriented Programming: A program is a collection of cooperating objectswhere each object is capable of: • Communicating with another object • Processing Data • Modifying the state of another object • Inheriting characteristics of another object -------------- -------------- ------------- --------------

  9. What is an Object? • Software objects are conceptually similar to real-world objects • They consist of state and related behavior • Methods (Behaviour): • way of communication • operate on the object state • Variables (State) “Hello People!!” length “Hello World” String Bicycle toUpperCase equals toLowerCase contains

  10. What is an Object? Rectangle box = new Rectangle(5, 10, 20, 30); Rectangle box2 = box; box2.translate(15, 25); box box2 box Rectangle Rectangle X = 20 Y= 35 Width = 20 Heigh = 30 box2 X = 5 Y= 10 Width = 20 Heigh = 30 int num = 13; int num2 = num; num2=12; num = 13 num2 = 12

  11. Java Programming Language • Object-oriented Programming Language (Sun Microsystem, 1995) • Derived from C/C++ • Java applications runs on a Java Virtual Machine regardless of • computer architecture • Good for computer networks and internet

  12. Virtual Machine (VM) • Software implementation of a machine (computer) that executes programs like a real machine. • No direct correspondence to real hardware • System virtual machine simulation of a complete operating system (OS) • Process virtual machine designed to run a single program • The software running on a VM is limited to the resources provided by the virtual machine -- it cannot break out of its virtual world.

  13. Java Virtual Machine (JVM) • Implementation of a machine that specifically executes Java code • JVM is a Process Virtual Machine • JVMs available for any computer architecture • JVM is created when the process is started and destroyed when it exits • Provide a platform-independent programming environment • Write once run anywhere

  14. Bytecode and Compiler • Java Virtual Machine operates on Bytecode • Java bytecode is the form of instructions that the Java virtual machine executes Compilation (Translation into Bytecode) Test1.class 21 40 16 100 163 240 Load the program in the memory and execute it Bytecode

  15. Java Virtual Machine (JVM) • JVM is distributed along with a set of standard class libraries • JVM + Libraries = Java Runtime Environment (JRE) NOTE: In computer science, a library is a collection of subroutines to develop software

  16. How to use Java? • We need to download the Java Development Kit (JDK) • JVM + Libraries + Compiler + Loader + Debugger + Other Utilities JRE Utilities

  17. Installing JDK http://www.sun.com

  18. Installing JDK JDK 6 Update 7

  19. Installing JDK Download Windows Offline Installation

  20. Installing JDK Apri con...

  21. Installing JDK File  Options

  22. Installing JDK Browse Directory to Download

  23. Installing JDK Ready to Download Start

  24. Installing JDK Run executable file and follow the installation setup

  25. Set the PATH Variable Start  Programmi  Pannello di Controllo  Sistema  Avanzate  Variabili Ambiente Previous PATH variables;C:\Programmi\Java\jdk1.6.0_07\bin javac FileName.java  Compile Program java FileName  Run Program For more info  http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html

  26. Run your first program! Start  Esegui  “cmd”

  27. Installing JDK Documentation Download Zip File and Unzip anywhere Java SE 6 Documentation

  28. Installing JDK Documentation Zip File Unzipped

  29. Installing JCreator http://www.jcreator.com Download (Integrated Development Environment)

  30. Installing JCreator

  31. Installing JCreator

  32. Java for Linux Menu  Sistema  Terminale Menu  Accessori  Editor  KWrite

  33. Java for Linux

  34. Java for Linux

  35. Java for Linux

  36. Java for Linux

  37. Java for Linux

  38. Thank You

More Related