Core Java 2 - Volume I - Fundamentals, 5th Ed.
We're keeping the first two sections short and sweet, but if you'd like to skip the introductory hooey then go right to chapter three and get right to it.
Overview
Just what is Java? Why all the hype? Java is an object oriented programming language that has several advantages over all other OOP languages. Firstly, it's platform independent. Secondly, it's the preferred language of the World Wide Web. Java applets (baby applications) permeate the web. Thirdly, it's the preferred language for micro computing devices like phones and palms. Lastly, it improves upon some of the things C++ people have been complaining about for years. Because it was developed in the 90s it has an advantage on C++ in the areas of threading, networking and it's seamless integration with the Internet. It's not too hard to learn either. Like they say in the book, no language as powerful as Java is easy to learn, but you'll be fine. If you already know C++ it will be a breeze. You'll find yourself merely memorizing differences and you'll be on your way.
A Short History of Java
Best to get the book for the full story, but I'll give you a little teaser. In 1991 a group of SUN Engineers including Patrick Naughton and James Gosling wanted to make a small robust computer language to support mini electronic devices like cable switch boxes. In order to do this efficiently they had to come up with something that was platform independent (for example; runs the same on PC with Windows as it does on an Apple with Sys 10. The code is the same. What's different is the Interpreter that takes the java code and runs it for you. Each machine's JVM or Java Virtual machine is made for the platform, not the language or the code itself.) and generate tight code. (less space in memory, efficient use of resources, elegant, you get the idea.) The code name for their new programming language project was "Green".
They based the new language on C++ and made it object oriented (we'll cover this later) and not procedural. In 1992 they were almost finished with it and Gosling wanted to call the new language "Oak" after an oak tree that was outside his office. They later found that there was already a language called Oak and they renamed their new computer language JAVA.
The "Green" group spent a good part of 1993 and 1994 trying to find companies to buy their new technology, but no one seemed to bite. Things were not looking good in Java land.
Then came the big break. Around 1994 the Internet was gaining in popularity and everyone in the world was getting online. Early Internet people will remember the first version of Mosaic they installed. With this in mind, Gosling thought that Java would be perfect to build a World Wide Web browser with. Some of the features of Java that workstation folks didn't really care about, like being architecture neutral, good security and reliability would really shine in this particular application. So Naughton and Jonathan Payne set about creating HotJava, a web browser written in Java. They made the browser so you could run Java applications from inside it, what we now call applets, and the ability to run code from inside the browser really set HotJava apart and made Java very noticeable.
The HUGE breakthrough came in 1995 when Netscape decided to make their popular web browser Navigator Java enabled in 1996. Now EVERYONE knew what Java was and how it could be used. Java was soon licensed by IBM, Symantic and a host of others. Even Microsoft began shipping Windows with a Java Virtual Machine. You could run Java code anywhere.
Sun released the first version of Java in 1996 and soon updated it. These first versions were OK, but lacked the tools needed for serious application development. They could spruce up your web page, but they really couldn't be used for much more. Then, in late 1996, Sun announced it's plans for Java. A whole host of improvements and libraries, making it a language that would soon rival C++ for application development. The work continued and in 1998 Sun announced the upcoming release of Java 1.2 at the JavaOne conference. Now they were ready for prime time and with new sophisticated GUI and graphics toolkits. Now they were a real application programming language. The difference was so big that they soon changed the name to Java 2.
Since then there have been two major upgrades to what's come to be known as the Java 2 Software Development Kit, Standard Edition. Versions 1.3 and 1.4 have both been released as of this writing and have stabilized the Java platform. Now that the base platform has been stabilized the work began on improving the libraries for Java. Libraries for such things as the Enterprise edition and the Micro edition are making Java a strong force in the business world because of their sophisticated and reliable services.
Java is only going up, and now is as good a time as any to jump on the train. The advantages of learning and using Java are greater than any other programming language including C++, the former defacto application programming language used by the masses. Java's code runs in web browsers, making e commerce the perfect area for it. Platform independence means that PC, Unix and Apple users can all use the exact same piece of code wherever they are. Java and Java based products are the future.
Common Java Misconceptions
Java is an extension of HTML - This is wacky and not true.
Java is easy to learn - Not really, but don't be scared.
Java is an easy environment to in which to program - If you came up on UNIX you'll be fine, but there's a generation out there who doesn't know what a command line is.
All Java programs run inside a web page - Wrong again.
Java is interpreted so it must suck - yes and no. You'll see why...
Applets are a security risk - not really. Used to be. Not anymore.
Enough context. Let's get your machine ready to program with Java and then move on to the language itself.
Send mail to lars@sorcon.com with
questions or comments about this web site.
Copyright © 2004 Sorensen Consulting