Back to the Web Developer's Journal Main Page
internet.com
side nav bar

Can't tell your Beans from your Applets? Wondering if a Servlet is a small server waiting to grow up? Read our compact guide to Java and you'll soon be dropping JAR, JVM and JSDK into casual conversations along with the best of them. Nobody will bother listening to you, but they'll still be mightily impressed.
Java Articles at the Web Developer's Journal - Java programming tutorials, applets, beans, servlets and more.
Back to the Web Developer's Journal Main Page
internet.com
side nav bar










We've tried to assemble a collection of articles about Java to help the beginner or the real Java gurus. If you have questions (or answers) concerning Java, please visit our Java Discussion Group.

HOW DID THEY DO THAT???

Find out in:
Amazing HTML



Site Map


Jobs at webdeveloper.com
Check out our Web-based
Discussion Groups:

Check out and join our email-based Mailing Lists for Web developers.

Ask the JavaScript Weenie:

For news and reviews of the latest computer audio tools, visit: The Tapeless Studio
Java Resources for Web Developers

Java Hub

If you have questions about Java development you have arrived at the right place. Scroll down for articles about servlets, product reviews and "how to do it" articles. We also maintain a Java discussion group.

 In This Section

 Java

  • Taking Notes on Java
    Edward Tanguay sings the praises of a very important language.

  • The Bluffer's Guide to Java
    Can't tell your Beans from your Applets? Wondering if a Servlet is a small server waiting to grow up? Read our compact guide to Java and you'll soon be dropping JAR, JVM and JSDK into casual conversations along with the best of them. Nobody will bother listening to you, but they'll still be mightily impressed.


  • Java: Coming to a TV near you!
    The new Java TV API holds the promise of Java-based interactive television using set-top boxes.


  • Java vs Other Web Application Technologies
    (The JavaBoutique) Selena Sol, author of JavaBoutique's Introduction to Java, gives an in-depth comparison of Java and other development languages such as dHTML, ASP, and Perl.
  • Agent Communication
    Agent technology is becoming more prevalent as the availability of network access, and the demand for the end-uses of agents, become greater.

  • Java Web Server in Brief
    A simple, dependable, and inexpensive ecommerce solution for small businesses is proposed.


  • JD WorkShop vs Cafe
    Two Java Tools Compared

 Java Server Pages

  • JSP: The Back Door into Java
    Edward Tanguay discovers JSP, and finds it finally allows him to put his theoretical knowledge of Java to use, and hence, get a foot into the Java programming world.

  • Building Java Server Pages
    A detailed look at building JSP pages. Should you use JSP or servlets? It depends on the ratio of markup to code. Here you'll also find a guide to the different varieties of tag, and details about the main tags such as <jsp:useBean> and <jsp:setProperty>.

  • Site User Logon with XML, Java Beans and JSP
    During this tutorial we will use XML and Java Server Pages to verify a user's logon - and then store the results in a session Java Bean for easy access.

  • Serving Dynamic WAP Content with Java Server Pages
    Here's how to create dynamic content for WAP-enabled mobile phones using the Wireless Markup Language (WML) and Sun Microsystems' Java Server API. Our Java Server Pages application displays regularly updated appointment data for someone on the move, such as an appliance engineer making house calls.

  • Object Persistence Made Easy
    With object serialization, your Java applets and applications can save and load the state of objects to disk or over a network. In this article, we'll examine the benefits of object serialization, and how to implement it in your own programs.

 Servlets

  • Intro to Servlets
    Java servlets are making headlines these days, claiming to solve many of the problems associated with CGI and proprietary server APIs. In this article I will describe the overall servlet architecture and what you need to develop your application with servlets. I will use several code examples to show you how to use the Servlet API, and compare it with CGI and proprietary server APIs where appropriate.

  • Internationalizing Servlets
    How to use the Java Internationalization API to build server-side code that alters its output based on the location and language of the user. We demonstrate the use of the API by building a simple method which displays a product entry for a shopping cart application.

  • Using the HttpSession object of the Servlet API
    The Java Servlet API represents an elegant and powerful way to shift processes from client to server, and offers a number of advantages over CGI. These advantages have certainly been enumerated so that most developers are aware of the servlet advantage. However, some of the details of the servlet architecture may at first seem daunting. Here's a short introduction on one aspect of writing servlets: the HttpSession object.

  • Improved Performance with a Connection Pool
    Establishing a connection once and then using the same connection for subsequent requests can dramatically improve the performance of a database-driven Web application. Since Servlets can keep information between requests, a database connection pool is a straightforward solution.

  • Servlets Are for Real!
    Servlets are on duty now at a Web site near you.

  • Netscape-Flavored Servlets
    How to implement server-side Java using Netscape's implementation of Java within the Enterprise Server.

 Java Discussion Group

  • Java Discussion Group
    Test the experts who hang out here with your toughest Java questions. You can also sign up for our Java E-mail Discussion List.
 

 

 Archive



Back to the Web Developer's Journal Contact WDJ   •    Suits!   •    Propheads!   •    Ponytails!
Discuss   •    Subscribe   •    Search

Be a Commerce Partner                       
HOW DID THEY DO THAT???

Find out in:
Amazing HTML



Site Map

Jobs at webdeveloper.com


Check out our Web-based
Discussion Groups:

Check out and join our email-based Mailing Lists for Web developers.


Developer Channel
FlashKit
Jobs.webdeveloper
JavaScript.com
JavaScriptSource
JustSMIL
ScriptSearch
Streaming Media World
WebDeveloper.com
WebReference
XMLFiles
WDVL
Discussion Groups Book Reviews Software Reviews Download Web Tools

Once Upon A Time There Was An Island In Indonesia...

The Bluffer's Guide to Java

by Steve Patient

No Web developer can afford to ignore Java, but it's a frontier world full of strange names and acronyms. So here's our non-definitive, partially inclusive guide to Java jargon. Just the thing to read before you go to that job interview where "knowledge of Java would be an advantage".
April 25, 2000

Background

Java started life at Sun as an object oriented embedded language for consumer devices called Oak. Sun released Oak as Java in 1995 after reworking it for the Web. The first version, Java 1, was embodied in the freely downloadable JSDK - Java System Development Kit. The current version is Java 1.2.2, known as Java 2.

Java is an architecturally neutral language with a similar look and feel to C++. Although it's a compiled language, the compiler produces Bytecodes designed to run on a JVM, a Java Virtual Machine, rather than target processor or Operating System.

Only the JVM need be implemented for a specific hardware platform and, in a perfect world, any program written in Java will run unchanged on any platform for which a JVM is available.

However, it's perfectly possible to write non-portable Java programs if you need to take advantage of platform-specific features. In order to ensure full portability, Java programs must be written to the JNI - Java Native Interface. The JNI also enables Java code running in a JVM to operate with applications and libraries written in other languages such as C++.

Adding to Java's flexibility, the Invocation API enables you to embed the JVM into a native application.

Applets, Servlets, Beans…

Java comes in three pre-packaged editions from Sun. J2ME - Java 2 Micro Edition, J2SE - Standard Edition, and J2EE - Enterprise Edition. J2ME is aimed at those producing embedded code for phones, set top boxes and other consumer devices. J2SE is aimed at application and Web developers, while J2EE is aimed at those producing distributed enterprise applications.

Most Web users come across Java as Applets, intended to be downloaded with, and run within, a Web page. Sun originally released the HotJava browser with Java. Written in Java, it's a Web browser with a built in JVM. Both Netscape and Internet Explorer now include a JVM.

Running any downloaded program is insecure and Applets are therefore constrained to a Sandbox (unlike ActiveX). The Sandbox denies Java Applets direct access to the underlying hardware and OS. This enables end users to trust them. Applets cannot be run alone. Applets are simply a subset of Java programs, not intrinsically different.

In contrast, full blown Java applications are designed to be loaded and run locally with full access to local hardware and software via the JVM. Though there is a security model for Java applications based on policies which can restrict an application's permissions for network, file or directory access and so on.

Java has proved particularly popular for server side applications, thus the name, Servlets. In practice, a Servlet is a program which runs within a Web server similar to the way an Applet runs in a browser. You'd use one instead of a Perl CGI script, for example.

It's worth noting JavaScript isn't Java, it was developed as an interpreted HTML scripting language by Netscape to enable a greater degree of user/page interaction.

Java is an object oriented language. The underlying technology for implementing Java objects is JavaBeans. These are objects designed for intra-process communication. In effect, you bolt JavaBeans together to create Java applications.

In constrast, EJB - Enterprise JavaBeans - are objects designed for inter-process communication. EJBs support distributed processing. It's a fairly new and complex technology and quite distinct from JavaBeans despite the repeat of the name. Enterprise Java technologies are discussed more fully below.

Classes, Compilers…

A Java application will consist of Java class files plus data files such as images and any other components. With the advent of JavaBeans, the JAR - Java Archive - file format arrived. Based on the ZIP format and using LZW compression, a JAR file is a convenient way to distribute a Java application.

As far as Java developers are concerned, the J2SDK - Java 2 Developer Kit - is the current standard. There are also Integrated Development Environments implemented as wrappers around the J2SDK. The main J2SDK components can be conveniently divided into tools, class libraries, demo programs and class library source code.

While all Java programs are implemented as a class file, the JFC - Java Foundation Classes - in J2SDK are often referred to as Java APIs - Application Programming Interfaces. These are what enable Java applications to be architecturally neutral. The JFCs are basic to Java's portability.

Java's J2SDK provides command line tools. These include the Java compiler, called javac, the run time environment containing the Java bytecode interpreter, which is - logically enough - called java, a debugger called jdb, javaviewer for running applets and javadoc for document generation.

Java programs are saved with a .java filetype and compiled to a .class file. Class files can be grouped together in Packages for convenience and in practice any class file not in a Package is assumed to be in the default Package.

Java's class files embody Java technology, and are constantly being extended. One of the more exciting recent additions to the JFC is the Swing library. This enables you to easily generate consistent graphical user interfaces in Java. Previously, you had to use AWT, the Abstract Windowing Toolbox. All you need to know about it is that it wasn't up to the job and, specifically, applications using it exhibited different behaviours on different platforms.

And More

EJBs are one of the main components of J2EE - Java 2 Platform, Enterprise Edition. Other important components include JDBC - Java Database Connectivity. This implements connection to various database systems via a Driver class.

RMI - Remote Method Invocation - provides a straightforward support for distributed computing provided both clients and servers are also written in Java.

For situations where the client or server isn't Java based, Sun provides Java IDL - Interface Description Language. This is a CORBA based solution which includes a built in ORB - Object Request Broker. Such solutions are also available from third party developers.

JNDI - Java Naming and Directory Interface - supports network directory services including NIS, LDAP and NDS as well as for RMI and CORBA directory services.

JMS - Java Messaging Service - supports networked messaging services. In practice, this appears to be little used. Possibly because a separate JMS is necessary for each, vendor specific, messaging service.

Sun is trying to extend Java into every area of computing life - so expect JIVE - Java Interpersonal Relation Interface RSN. In the meantime, the Java technologies below are already available.

Java Plug-in Software enables you to tell applets or JavaBeans on enterprise intranet Web pages to use JRE - Java 2 Runtime Environment - instead of the web browser's built in VM.

The Java Card specifications puts Java to run on Smart Cards and memory limited devices. This enables you to write Smart Card applications which will run on different Smart Card technology - as long as it also uses the Java Card. To develop Java Card apps you need the JCAE - Java Card Application Environment - which Sun normally licenses to OEMs.

PersonalJava is an application environment for those developing applications for personal devices with network connection capabilities. It's even available for Windows CE.

Which brings us to the most hyped and least used Java technology, Jini, which oddly isn't an acronym. Jini is designed to enable hardware devices to recognise and work with each other automatically.

Although we've by no means exhausted even Sun's Java technologies, and haven't touched on any from third party vendors, this should be more than enough to get you through the job interview.



Steve Patient has covered computing, telecommunications, networks and the social and business changes they bring, since 1978. He believes the best a technology writer can hope for is to emulate the monks of the middle ages. To chronicle a small piece of a much larger picture as accurately as possible. It will be down to some future scribe to make these days look like an inevitably unfolding tale.
Back to the Web Developer's Journal
Contact WDJ   •    Suits!   •    Propheads!   •    Ponytails!
Discuss   •    Subscribe   •    Search


internet.com

IT | Developer | Internet News | Small Business | Personal Technology | International | Search internet.com | Advertise | Corporate Info
Newsletters | Tech Jobs | E-mail Offers

internet.commerce
Be a Commerce Partner