ONJava.com -- What Is Java

来源:百度文库 编辑:神马文学网 时间:2024/05/27 06:12:35


Sign In/My Account |View Cart
ArticlesWeblogsBooksLearning LabeDocumentsPodcasts
',1)">

O‘Reilly Emerging Technology Conference March 6-9 2006, San Diego, CA

Search ONJava

Login
Register
Manage Newsletters
Register Your Books
Sponsored Developer Resources
ASP.NET 2.0 Training Center
Altova Developer Zone
What are those funny green links?
ONJava Topics
All Articles
Best Practices
Enterprise JavaBeans
Java 2EE (Enterprise)
Java 2SE (Standard)
Java and XML
Java Data Objects
Java IDE Tools
Java Media
Java Security
Java SysAdmin
JDO/JDBC/SQLJ
JSP and Servlets
Open Source Java
P2P Java
Web Services
Wireless Java
ONJava Resources
Software Directory
Java API Map
ONJava Affiliates
davidflanagan.com
java.net
jdom.org
Servlets.com


Headlines

Search and Read Mac Development Books Online
New ADC Article: Using the Accelerate Framework
New ADC Article: Scoping Your Transition Projects


Sites
codezoo.com
Databases
Emerging Telephony
LinuxDevCenter.com
MacDevCenter.com
Mozilla DevCenter
ONJava.com
ONLamp.com
Apache
BSD
MySQL
PHP
Python
Security
OpenP2P.com
Perl.com
Policy DevCenter
Ruby
SysAdmin
What Is…
WindowsDevCenter.com
Wireless DevCenter
XML.com
WebServices.XML.com
Affiliate Sites
LinuxQuestions.org
OSDir.com
Servlets.com

 


Print
Bookmark with del.icio.us
What Is Java
byChris Adamson
03/08/2006 Java "Java" generally refers to a combination of three things: the Java programming language (a high-level, object-oriented programming language); the Java Virtual Machine (a high-performance virtual machine that executes bytecodes on a specific computing platform, typically abbreviated JVM); and the Java platform, a JVM running compiled Java bytecodes, usually calling on a set of standard libraries such as those provided by Java Standard Edition (SE) or Enterprise Edition (EE). Though coupled by design, the language does not imply the JVM, and vice versa.
In this Article
The Java Programming LanguageThe Java PlatformsThe Java Virtual MachineThe JVM Without JavaThe Java Community ProcessConclusions
We recently received an email asking for a "What Is Java" entry on the O‘Reilly NetworkWhat Is site. Who could possibly not know what Java is in 2006? After ten years of books, websites, and conferences, doesn‘t everyone know what Java is? Apparently not.

After all, things have changed.
For every dusty definition that speaks of applets and Just-In-Time compilers, there are new directions and new realities that have settled in, understood by many, yet not always completely documented. Java used to mean:
Applets Bytecode interpretation Slow performance A "cargo cult" awaiting drops from Sun
Today, it means:
Web applications, web services, SOAs, etc. Hotspot dynamic compilation High-performance An open source community, increasingly independent of Sun
The old slogan "Write Once, Run Anywhere" still holds true--but what‘s being written and where and how it‘s being run are changing.
The Java Programming Language
Related Reading
Beyond Java
ByBruce A. Tate
Read Online--Safari Search this book on Safari:  
Only This Book All of Safari
Code Fragments only
Java, the language, is a high-level object-oriented programming language, influenced in various ways by C, C++, and Smalltalk, with ideas borrowed from other languages as well (see O‘Reilly‘sHistory of Programming Languages). Its syntax was designed to be familiar to those familiar with C-descended "curly brace" languages, but with arguably stronger OO principles than those found in C++, static typing of objects, and a fairly rigid system of exceptions that require every method in the call stack to either handle exceptions or declare their ability to throw them. Garbage collection is assumed, sparing the developer from having to free memory used by obsolete objects.
One of Java‘s more controversial aspects--widely accepted at the time of its release but increasingly criticized today--is its incomplete object-orientation. Specifically, Java primitives such as int, char, boolean, etc. are not objects, and require a completely different treatment from the developer: as int is not a class, you cannot subclass and declare new methods on it, cannot pass it to a method that expects a generic Object, and so on. The inclusion of primitives increases Java performance, but at the arguable expense of code clarity, as anyone who‘s had to work with the so-called "wrapper classes" (Integer, Character, and Boolean) will attest. Java 5.0 introduces an "autoboxing" scheme to eliminate many uses of the wrapper classes, but in some ways it obscures what is really going on.
Philosophically, Java is a "fail early" language. Because of its syntactic restrictions, many programming failures are simply not possible in Java. With no direct access to pointers, pointer-arithmetic errors are non-existent. Using an object as a different type than what it was originally declared to be requires an explicit cast, which gives the compiler an opportunity to reject illogical programming, like calling a String method on an Image.
Many Java enterprise frameworks require the use of configuration files or deployment descriptors, typically written in XML, to specify functionality: what class handles a certain HTTP request, the order of steps to execute in a rule engine, etc. In effect, they have to go beyond the language to implement their functionality. Critics point out that this has the perverse effect of not only escaping Java‘s compiler checks, but also that a developer can no longer determine how a program will operate just by looking at its source code. Java 5.0 adds annotations to the language, which allows the tagging of methods, fields, and classes with values that can then be inspected and operated on at runtime, usually through reflection. Many programmers like annotations because they simplify tasks that might otherwise be addressed by deployment descriptors or other means. But again, they can make it difficult to understand Java code, as the presence or absence of an annotation may affect how the code is executed, in ways that are in no way obvious from the annotation.
Despite these criticisms, Java is generally understood to be the most popular general-purpose computing language in use today. It is a widely used standard in enterprise programming, and in 2005, it replaced C++ as the language most used by projects onSourceForge. What it has going for it is immense: free tools (on multiple platforms: Linux, Windows, Solaris, and Mac can all compile and execute Java apps), a vast base of knowledge, and a large pool of readily available developers.
The Java language hits a specific point in the tradeoff between developer productivity and code performance: CPU cycles keep getting cheaper, developers largely don‘t, so it is perhaps inevitable to accept another layer of abstraction between the developer and the execution of CPU opcodes, if it allows the developer to create better software faster. In fact, critics of Java‘s productivity, such as Bruce Tate inBeyond Java, may simply be observing this trend continuing past Java to a new sweet spot that further trades performance for developer productivity.
Pages: 1,2,3
Next Page



Cross Training For Web Developers
Keeping your skills up-to-date can be a full-time job. Microsoft, O‘Reilly Media and Dr. Dobb‘s have assembled everything you need to keep your skills aligned with market demand -- including a series of more than 40 free Webcasts!
Attend 3 webinars and receive Microsoft Visual Studio 2005 Standard Ed.(NFR) free!
Sign-up for the webcast series today!
Sponsored by:
',2)">
 



Contact Us |Advertise with Us |Privacy Policy |Press Center |Jobs
Copyright © 2000-2006 O‘Reilly Media, Inc. All Rights Reserved.
All trademarks and registered trademarks appearing on the O‘Reilly Network are the property of their respective owners.
For problems or assistance with this site, emailhelp@oreillynet.com
_xyz_Flash