





























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to java, its history, motivations, features, and applications. Java is a popular programming language known for its portability, simplicity, and robustness. In this lecture, we will cover the history of java, why it was developed, some sample java applications, and the steps to write and run a basic java program.
Typology: Slides
1 / 37
This page cannot be seen from the preview
Don't miss anything!






























Intro to Java
History
Based on C and C++
Developed in 1991 for intelligent consumer electronic devices Green Project (According to Gosling, "the goal was ... to build a system that would let us do a large, distributed, heterogeneous network of consumer electronic devices all talking to each other." ) James Gosling Modified C++
Named Oak then Java
History….
Motivation
Multithreading , Swing , RMI , NET , SQL …..
Java Platform
The Java Platform
Intel PowerPC SPARC
Windows Linux OS X Solaris Linux
Java Virtual Machine
App1 App2 App3 App4 App
Object-Oriented
Distributed / Network
Oriented
Inherently network friendly
Original release of Java came with Networking libraries
Newer releases contain even more for handling distributed applications
Robust / Secure / Safe
No pointer arithmetic or memory management! The JVM “verifier” Checks integrity of byte-codes Dynamic runtime checking for pointer and array access No buffer overflow bugs! SecurityManager to check which operations a piece of code is allowed to do “Sandbox” operation for applets and other untrusted code Limited set of operations or resources made available Contrast to ActiveX
Rich Set of Libraries
Disadvantages
Tradeoff between development time vs. run time Additional checks in Java which make is secure and robust and network aware etc, all have a small cost.
JIT compilation and HotSpot Dynamic compilation of bytecode to native code at runtime to improve performance HotSpot optimizes code on the fly based on dynamic execution patterns Can sometimes be even faster than compiled C code!
Microsoft vs. Java
Was considered a threat to Microsoft’s dominance
Sun vs. Microsoft Law Suit
C#