Hello World

A Hello world program is the simplest program it's possible to write, usually with just one feature: printing out Hello, World! somewhere. Hello world programs are great for getting started because they prove you've set everything up correctly, and quickly produce a visible result. They're not about learning to program as much as getting all the different tools you need together, and encountering the common ways things can break.

There are lots of Hello World programs you can write getting started with Java and LimeWire. First, follow the Getting Started steps to get the Java Development Kit and Eclipse, and access the Command Line. If anything goes wrong with any of the examples below, it's always easy to Start Over. Hello Path shows default paths the examples use.

Hello World Programs

The first set of examples demonstrate making projects in Eclipse, and setting the Java Classpath. Thus equipped, start with Hello Command: a single-line program that prints out Hello, World! on the command line. Then use Java Swing to give it a graphical user interface with Hello Swing. Hello Jar uses Ant to package the program in a jar so you can give it to a friend.

Java's founding promise is "Write once, run anywhere." Hello Mac and Hello Linux run your new program on those platforms. Make icons for your program with Hello Icon, and let Hello Launch give it a native Windows launcher. Bringing all these steps together, Hello Portable packages your Java program so users can carry it between Windows, Mac, and Linux.

Larger Java projects have more complicated folder organizations. Hello Project shows how to set one up in Eclipse. Hello Resource adds an icon image, and makes sure it gets zipped into the jar. Hello Test uses JUnit to run code that tests a class is working the way it should.

Java programs can bring along library jars to do more than the Java platform alone provides. Hello Library uses the Apache HttpComponents jars to download a web page. You can even use LimeWire.jar this way. Hello LimeWire shows how.

Open source is all about code sharing. Hello Git uses free software and services to share your code with the world.