Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!


P.G.Daly's Intranet Talk
Java: Confusing Things Made Simple - What You Need to Get Up and running

By P.G.Daly

Printer Friendly Version

So you want to develop in Java for the web and you’ll be getting to do just that in the near future (or so the powers that be keep saying…), but you find yourself hopelessly confused in conversations with experienced Java developers.  Terminology, environment, setup, which is what? What do I need?  What’s a servlet and why do I want to know about that stuff?  I must not be cut out for this, as I can’t even get Hello World or the tutorials to work.  Heeeelllp!

If you’ve ever felt that way, as I have been recently, I’m here to say you need to break things down into what you really need to know and keep it simple.  After much struggling with just getting a solid understanding and my environment set up, I thought sharing my lessons learned with you might help those of you experiencing similar stress.  That is, you already understand how the web works, you’ve done programming, and you’re PC savvy, but you just can’t wrap your mind around the whole Java thing.

What do I need to get started?

Java is an incredibly robust object oriented programming language that has many different facets to it.  From the Standard Edition to the Enterprise Edition to the Micro Edition, additional API’s, and all the technologies incorporated within such as Java Server Pages (JSP) and servlets, JDBC, and many more - why its enough to make your head spin.  All things Java, a veritable online tome, can be had at http://Java.sun.com.  This is the site to go to for any downloads, online tutorials and documentation.  I have found this site essential, however, if you don’t know what you’re looking for, it can be very overwhelming and add to your confusion.  Be patient with it and get advice from other real live people when you can.

My biggest confusion with all the terminology and different pieces was that I just wanted to know – what are the basics I need to get set up and start working on web applications?  I finally got my answer through trial and error, and guidance by an experienced Java guru.  Here’s what I learned….

Platform Requirements:

·        JDK – the latest Java Development Kit (currently version 1.3.1) that consists of the compiler, interpreter and other executables, the Java Runtime Environment (Java Virtual Machine), and the standard class libraries.

·        Web Server with a servlet engine (example: Iplanet, Tomcat, Weblogic, JRun)

Once you have these 2 pieces, you can essentially write, compile, and run Java code in a web environment (servlets and JSP).  (You can also run applications and applets, but for the sake of my story, I am focusing on web development and Java to mean JSP and servlets.) 

Some additional platform requirements that, for all practical purposes, you will need include:

·        An Integrated Development Environment (IDE) such as JBuilder or Visual Café just to name a few.  Keep in mind, though, that you can do everything you need to with a text editor and the tools in the JDK.  In fact, as with all languages, it is best to learn either in textpad or with little assistance from an IDE until you are thoroughly versed in the language.

·        JavaMail – a Java mail application (you can download from the Sun Java site) that provides an API for you to send e-mail through your Java programs.

Once you’ve gotten your software installed, you will need to make some configurations to your environment to make things work. Assuming a Windows environment, these include (the same types of configurations are required on UNIX as well):

·        Set the PATH variable to include the path to the JDK executables (ex: c:\jdk1.3.1\bin).  This will allow you to access the Java executables from anywhere in your environment without typing the fully qualified path.

·        Set the CLASSPATH variable to include any classes and JAR files you will be using throughout your standard environment.  For example, if you were using JavaMail, you would include its JAR files in the CLASSPATH (ex: C:\JavaMail-1.1.3\mail.jar;C:\JavaMail\activation\jaf-1.0.1\activation.jar; C:\JavaMail-1.1.3\smtp.jar;).  If you keep getting errors like “Class Undefined” when you try to compile things, the CLASSPATH is the place to solve your problem.

·        Set up a default directory structure for your web server.  For example c:\www as your default web root, c:\www\servlet for your default servlet directory and so forth.

·        Add the mail.jar files to the Java Runtime Environment under the JDK (jdk1.3.1\jre\lib\ext directory).

·        Configure your web server to work with your JDK, point it to your servlet default directory, and enable JSP support.

Once you have these settings completed, you want to test a simple servlet and JSP page such as Hello World in order to make sure all is working before you start into development.  In addition, before you start using your IDE, you will need to configure its project properties to utilize the proper directories in your structure and to include any additional required libraries (such as JavaMail for example).

What is What?

By no means will I be able to tackle the universe of terminology associated with Java, but I would like to shed some light on a few of the terms I heard over and over about which I was initially confused.  For instance, the term Java tends to be used to refer to anything Java related.  Java itself is really like an umbrella encompassing its many flavors.  Java can be simply defined as a high level object oriented programming language that is platform independent.  JavaBeans are objects written in Java whose implementations conform to conventions that allow it to be modular and reusable.  JavaBeans encapsulate its data, functionality, and behavior so that it can be used in a variety of contexts without the developer having to know its inner workings (the developer only need know its implementation).  Servlet is a Java program that runs on the server and is similar to CGI scripts in that it is given HTTP requests from a web browser as inputs, and it outputs data to the browser as HTTP responses.  Servlets do not spawn new processes with each request as CGI scripts do which makes them more efficient for higher volume applications.  Java Server Pages are an extension to the servlet technology (they are actually compiled into servlets at run time).  Similar to Active Server Pages, JSP have dynamic scripting capabilities that work in tandem with HTML code, separating code from the static elements that form the presentation layer.  The Java source code and its extensions embedded within the HTML in a JSP enable the page to be more functional performing such functions as dynamic database queries and interacting with JavaBeans and servlets. 

What Now?

 

Okay, so maybe that wasn’t the easiest thing on the planet to read, but it will get you started.  Perhaps it will even get you up and running with some trials and tribulations.  My best recommendation, especially to anyone new to object oriented programming (like myself) is to take a class.  Believe me, there is nothing like 5 days of Java training with people who read Java code in their spare time to get you primed.  If you don’t have the dough and the company isn’t paying, though, I recommend finding a good book and a few good web sites to work through tutorials to get you started.  Try http://java.sun.com, http://www.wrox.com, http://www.jguru.com to start.  There is definitely a learning curve, but once you start learning the functionality and the powerful potential of the language and platform, you will understand what all the fuss is about (and be itching to get a chance to really delve into using it hands-on).

I am hoping to become immersed in working with this technology over the next few months.  As I learn from real world experience guided by a Java guru I will share more tidbits with you.

Printer Friendly Version

More Intranet Talk

P.G.Daly's Intranet Talk: A PDF Primer (Part II)
Last time ( A PDF Primer Part I)I told you all about why you would want to use PDFs in the course of your work. I know you’ve been waiting for the how…. so without any ado, let’s cut to the chase and create some PDFs!
P.G.Daly's Intranet Talk: A PDF Primer (Part I)
What I learned in my last job is that many people aren’t sure when is the best time to use a PDF versus an HTML file versus some native application file for given web content. In addition, people aren’t always sure how to create them and some people wouldn’t know how to view them if the tech support staff didn’t already configure their computer properly so it “just happened” in the background. In this two article series, I plan to give you some rules of thumb for when to use PDFs versus other types of files as well as a quick primer of the different ways available to create PDFs and when to use what.
P.G. Daly's Intranet Talk: Your Webmaster Calls it Quits. Are You Prepared?
Your Webmaster delivers the news that she is leaving for new challenges. Are you prepared? Do you have any clue whatsoever what she does? Have you had any cross training with other Web talent in your organization? For that matter, do you even have other web talent in your organization?
P.G. Daly Intranet Talk: Basic Intranet Guidelines and Standards
P.G. Daly found getting the decentralized businesses in her company to accept intranet standards akin to herding cats, but less enjoyable. In response to never ending inquiries about what skills are required to author web pages, get access to do so, training, and the like, she revamped her standards and guidelines. Given the environment at her company, the limited authority afforded intranet professionals, and the need to lay down the law at least on certain issues, she created a basic framework by which content authors must work. The following article takes a glimpse at the guidelines she setup.
P.G. Daly's Intranet Talk: Using the Intranet to Improve Internal Sales Communications
Can you imagine a sales force roaming the countryside selling products without access to up to date customer information? Well, then you can imagine P.G. Daly's reaction when one division explained to her that a third party vendor maintained all the customer data for their division and that the only way salespeople could get this information was to phone the third party vendor, have them run a report, and then have it sent via fax or mail. Certainly not the most efficient or cost-effective process on the planet. Why not use the Intranet?
P.G. Daly's Intranet Talk: Giving the Intranet a Facelift
After much ado and a very long wait, I recently gave my Intranet a new look and feel. Originally, the project was supposed to encompass a number of process and procedural changes as well, but these got sidelined in light of a number of political and resource roadblocks. Nevertheless, I decided there were enough improvements to be had with just updating the look, feel, and navigation of the Intranet, so I forged ahead.
P.G. Daly's Intranet Talk: A Sure-Fire Way to Drive Traffic to the Intranet
After her last column, people asked P.G. Daly about other big success stories from her intranet, so she thought she'd share another "real big one" with you. One of the most sure-fire ways of driving traffic to your site is putting something employees absolutely need on the site and making that the only way they can get it. Sound simple? It can be (at least sometimes).
P.G. Daly's Intranet Talk: Using the Intranet to Improve Internal Sales Communications
About a year ago, one division of P.G Daly's company came to her with the problem of disseminating weekly sales reports. The problem was that they had about 60 sales people across 2 different sales forces (product lines) that had to submit sales reports to the corporate office on a weekly basis. These reports needed to be distributed to an audience of 40 or more people from regional sales managers to upper management. The process in place was to have everyone e-mail their weekly report (in a Microsoft Word Format that had a common template) to an Administrative Assistant who would photocopy and assemble packets that got sent through the regular inter-office mail. Needless to say, this occupied a good piece of this assistant's time the beginning of each week and wasn't the most timely distribution of information. This article shows how P.G. Daly and the company's Intranet came to the rescue.
Intranet Talk: Thoughts on Intranet Directory Structures
Recently, a number of people have asked P.G Daly questions about directory structure for Intranets. Namely, what is the best way to structure folders and files for my site? This question is valid both in the macro sense of an entire Intranet as well as for each individual author creating their own little piece of the pie. So, she got to thinking about how effectively she set things up on her company's Intranet many moons ago. What does she recommend as good practices? What would she suggest avoiding?
Intranet Talk - The Intranet Users Have Spoken Part III: Designing and Conducting the Survey
Many readers want to know how P.G. Daly designed and administered her intranet usage survey. Rather than answering a number of e-mails privately, she thought it would be best to share these details on the survey experience with everyone, so as to help readers implement their own intranet survey and put this knowledge to good use.
Intranet Talk: What Happens When the Intranet Users Have Spoken? Part II
In her last column, P.G. Daly shared with you the key conclusions from her recent Intranet survey. This time, she'd like to address the answers to the important questions of -- What do users want to see? What would encourage them to use the Intranet more often? And, most critical, what recommendations and actions does she have planned to address some of the biggest issues?
P.G. Daly's Intranet Talk: What Happens When the Intranet Users Have Spoken?
After over 18 months since the intranet was "officially rolled out", it was time to formally ask users if they were using the intranet or not and to find out what they found useful or useless as well as determine what would get them to use it more. Here's how I asked went about sending out and intranet survey and the type of feedback I recieved in return.
P.G. Daly's Intranet Talk: The Technical Skills Required of an E-Business Organization
Your Company just formed an E-Business. What technical skills does this organization need to be successful? Even if most of the large technical projects are outsourced, surely the group needs a core of technical skills to do some development and maintenance in-house, and even more importantly, to understand what systems are being implemented by these vendors and how it all fits together.
P.G. Daly's Intranet Talk: The Intranet Top-Down Sell or Grassroots Effort?
Unless you are in a high-tech company, or just plain got lucky, there is a reasonable chance that upper management is not quite as active in their support as you might like. So you're building the success of your intranet one "worker bee" at a time with some degree of grassroots effort at play. Can you truly grow an intranet organization-wide one person at a time? Maybe not quite that slowly, but you can increase usage and usefulness one niche at a time.
P.G. Daly's Intranet Talk: How Others Create and Manage Intranet Content
P.G. Daly's recent articles on creating and managing intranet content ("Creating and Managing Content" and "Authoring Tool Standards: Critical? or Form Over Function?") generated an overwhelming response from readers. In this column, She shares some of the most helpful comments and insights.
_P.G. Daly's Intranet Talk
"What is the Technical IQ of your Company? The life of your Intranet Could Depend on it." _
No matter how flashy the design, advanced the technology, or just plain cool your intranet is, the question still remains: are people using it? Although all companies have users on both ends of the PC savvy scale, overall, how would you rate your company's Technology IQ?
P.G. Daly's Intranet Talk: "Authoring Tool Standards Critical? Or Form Over Function?"
What about new authors or PC savvy folks in an MIS Department that want to publish content? Should they be forced into the "old" standards or allowed to branch out and try a new approach?
P.G. Daly's Intranet Talk: "Creating and Managing Content"
Content is king for an intranet. Yet if content is so important, and users desire it, why is it so difficult to create and maintain large amounts of information on a company-wide scale?
P.G. Daly's Intranet Talk: Organizational Structure and Its Impact on an Intranet?
As Intranet professionals, we tend to think most about technology (if we are techies), design (if we are designers or artists) or functionality (if we deal with the business users). But how often do we consider the basic organizational dynamics of our company?
P.G. Daly's Intranet Talk: "Build It And They Will Come?"
"Build It, And They Will Come". It may have worked for Kevin Costner in the movie "Field of Dreams", but chances are this philosophy alone won't work for your company's Intranet.
· More Intranet Talk

· Express Yourself

email this page

Tutorials
and more at:
Intranet Journal's Tutorials
Intranet Journal Favorites

Creating a PHP-Based Content Management System

The Spyware Guide

Introduction to Microsoft SharePoint Portal

Intranet Journal
Part of the EarthWeb Network

Managing Editor
Intranet Journal

Tom Dunlap

EarthWeb Home Page
Jupitermedia Home Page

Media Kit




The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers