Skip to navigation

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.

Latest News

A lowdown on... Java

Posted on 21 Nov 2001 at 16:43

/*

Display "Hello World!" to the standard output.

*/

class HelloWorldApp {

public static void main(String[] args) {

//display the text

System.out.println("Hello World!"); }

}

Here's the same functionality in 'Applet' form. (An applet is a program running within the context of another program, such as a Web browser. Generally, it will have limited access to the system it is running on.)

import java.applet.Applet;

import java.awt.Graphics;

public class HelloWorld extends Applet {

public void paint(Graphics g) {

g.drawString("Hello world!", 50, 25); }

}

Java installations

You may have a Java environment installed on your PC without being aware of it, perhaps installed to support the Java features of an application. For example, under a JavaSoft directory, I have a Java 1.3.1 Runtime Environment, with bin and lib subdirectories for binary executables and library files. I didn't explicitly search this out - it was installed as part and parcel of an application that required Java support for some of its features, for example the Opera browser.

This runtime environment supports the use of Java on your machine - Java can execute within this space. As long as a machine has runtime support for Java - and a Mac's support will differ from a Unix box, which in turn differs from a particular Windows platform - the application can carry out its functions.

Resources

If you are interested in finding out more and looking into Java in more detail, here are a few sites of interest on the Web.

Sun Microsystems, as you would expect, has a wealth of material on Java, from the perspective of both users and developers. Here are some of the main ways into its online content:

java.sun.com/java/

java.sun.com/getjava/

java.sun.com/docs/books/tutorial/

Here are some guides to getting started with Java code yourself:

developer.java.sun.com

developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/

developer.java.sun.com/developer/onlineTraining/Programming/BasicJava2/

Finally, numerous third-party sites also focus on the Java programming language. Type the keywords into your search engine of choice and you will be inundated. Here are just a few to get you started.

www.javacoffeebreak.com

www.gnu.org/software/java/java.html

www.javaworld.com

www.javareport.com

www.javapro.com

The low-down on programming languages

The low-down on .Net

Author: Alun Williams

1 2 3 4
Be the first to comment this article

You need to Login or Register to comment.

(optional)

advertisement

Most Commented News Stories
Latest Blog Posts Subscribe to our RSS Feeds
Latest Reviews Subscribe to our RSS Feeds
Latest Real World Computing

advertisement

Sponsored Links
 
SEARCH
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2008