A Little More Java
History of Java
Based on lectures by Walter Makovoz, Ph.D.
Thursday, October 30, 2008
Java Fundamentals Page 1
History of Java
1990 – Group of disgruntled engineers and programmers and Sun is created
James Gosling
– Master programmer who create the Java Language
Partick Naughton
– Designed the visual interfaces used to promote the Java environment
Sun names this team Green
Thursday, October 30, 2008
Java Fundamentals Page 2
History of Java
Green Team Application – Consumer Electronics Single Controller
– Programming a household thermostat – Coordinating a VCR and TV
1991
– “Behind the Green Door” document – Proposed a distributed, a network of totally dissimilar devices, using bytestreams to communicate with the controller. – Would be interpretable by toasters, VCRs, and house alarms.
Thursday, October 30, 2008
Java Fundamentals Page 3
History of Java
Initial steps
– Gosling had been trying to implement the environment by extending the C++ language. – C++ could not meet his needs. – Reasons
Direct memory management Fragile relationships among the components of C++ program C++ does not enforce object-oriented programming.
– Gosling invented a new language.
Thursday, October 30, 2008
Java Fundamentals Page 4
History of Java
Features of the new language
– Memory management is out of the hands of the application programmer by eliminating pointers and address arithmetic entirely.
Greatly enhances the robustness of the new environment.
– New language resolves references among classes at runtime instead of compile-time – A superclass could be changed without adversely affecting the software that uses it.
Thursday, October 30, 2008
Java Fundamentals Page 5
History of Java
Oak Language – Naughton developed visual interface for the new language
representation
The user could open a cartoon TV Guide Select a movie Perform various operations on the VCR Gosling got the animation working in this new language, which he called his office windows.
Oak, after tree outside
Thursday, October 30, 2008
Java Fundamentals Page 6
History of Java
1993 – Green Team is incorporated as
FirstPerson, Inc. (subsidiary of Sun) Looking to license technology
– – – – –
Cellular phone Industrial automation systems Interactive television CD-ROMs Commercial online services
Each time the deal fell through
Thursday, October 30, 2008
Java Fundamentals Page 7
History of Java
1994 – Bill Joy and Eric Schmidt marry Oak and the Net – Oak is adapted for the Internet use – Oak is renamed to Java – Naughton develops a Web browser with a builtin Java interpreter and names it HotJava.
Thursday, October 30, 2008
Java Fundamentals Page 8
Java Development Tools
Sun JDK 1.1 Visual J++ 1.1a Visual Café Pro 1.1
Thursday, October 30, 2008
Java Fundamentals Page 9
Sun JDK 1.1
When Sun released its JDK 1.1 this (including a new version of Java, also 1.1), it introduced a number of new features, many of which focus on component development and user interfaces. The new component architecture, called JavaBeans, is essentially an interface that lets Java-based components communicate with one another. It's similar to Microsoft's ActiveX technology, but JavaBeans can run wherever Java 1.1 runs.
– This component model was one of the last missing pieces in Java. – Although Java is an object-oriented language, without a standard to help developers write interoperable objects there was no way to build up libraries of useful Java components, the way Windows developers have created thousands of ActiveX components.
Thursday, October 30, 2008
Java Fundamentals Page 10
Sun JDK 1.1
Creating user interfaces in Java means using a set of classes, or object descriptions, called the Abstract Windowing Toolkit.
With Java 1.1, Sun has introduced a new event model for the AWT called delegation.
In simple terms, delegation lets your code separate the user-interface components from the logic that drives the interface. That makes it easier to change the interface without changing the logic, and vice versa. For now, only Sun's JDK supports all the Java 1.1 features. But both Symantec and Microsoft are rushing to incorporate 1.1 features into the Java tools these two companies have created.
Thursday, October 30, 2008
Java Fundamentals Page 11
Sun JDK 1.1
In today's world of fancy graphical development environments, a commandline Java compiler seems almost archaic. But since most people still build Web pages with text editors like NotePad or BBEdit, Sun's JDK fits right in. And best of all, it's free. Free doesn't mean without cost, however. For one thing, the JDK doesn't come with an installation program.
If you want a tool that installs itself and automatically sets up the necessary environment variables, you'll have to look elsewhere.
With the JDK, it's up to you to manually insert the appropriate classpath variable into your autoexec.bat file.
Nor does the JDK's compiler, Javac, support the notion of a project, a group of files to be treated as one applet.
Java Fundamentals Page 12
Thursday, October 30, 2008
Sun JDK 1.1
Once you get over the installation hurdle, the JDK 1.1.1 offers an unmatched level of Java power and functionality. Only the JDK currently implements the landmark 1.1 version of the Java language, which adds a slew of critical functions, including the new JavaBeans component model and improvements to the Abstract Windowing Toolkit. The AWT is one of the reasons Java works--it provides a cross-platform, graphical class library that lets you write user interfaces to run on any Java platform. But it has some limitations, both in performance and in design. – To speed the AWT's performance on Windows platforms, the JDK boasts new (dynamic link libraries) that support the AWT using the native Win 32 instead of going through the Microsoft Foundation Classes. – And on the design front, Sun has introduced a new event model called delegation, which lets Java programmers write apps that more cleanly separate the interface from the behind-the-scenes logic.
Thursday, October 30, 2008
Java Fundamentals Page 13
Traditional Programs
Binary File (PC)
Code
Compiler(PC) Binary File (Mac)
Compiler(Mac)
Binary File (Unix)
Compiler(Unix)
Thursday, October 30, 2008
Java Fundamentals Page 14
Java Programs
Java Interpreter (PC)
Code
Java Bytecode
Java Interpreter(Mac)
Java Compiler
(Platform Independent)
Java Interpreter(Unix)
Thursday, October 30, 2008
Java Fundamentals Page 15
JDK Configuration
Add to autoexec.bat
– PATH C:\WINDOWS;…C:\JDK1.1\BIN;
Add a line
– SET CLASSPATH=C:\|TECHY-1\JDK1.1\lib\classes.zip;,.;
Thursday, October 30, 2008
Java Fundamentals Page 16