This article will setup your Windows development environment for Java development using JSF.
1. First we will install Java 2 Standard Edition 5.0 (J2SE 5.0 for short), also known as Java JDK (Java Development Kit), Java SE, J2SE, Java 2 Standard Edition. This is the complete Java Development Kit (JDK) that is necessary for compilation of Java programs. The JDK includes the JRE (Java Runtime Environment) which is using only for running already compiled program.
The version that we are using 5.0, also known as "Tiger".
You can get the download from Sun website here and click the link "Download JDK 5.0 Update 4". Then choose "Windows Offline Installation, Multi-language" and save the exe file to a temp directory on your disk.
2. Then run the executable file to install. When you get to the Custom Setup step, change the "install to" directory to install the software to a directory such as "c:\java\j2se50", and not to the default directory nor to any other directory that contains spaces. It will as you for the location twice -- once for the JDK (java development kit) and another time for the JRE (Java Runtime Environment). In both cases, you can This directory is referred to as $JAVA_HOME.

3. When ask which browser you want to register the Java plugin, go with the default and select all browsers.
4. After you have completed the installation, you can delete the original exe file that you had download from the web to your temporary directory.
5. If you examine the c:\java\j2se50, all the Java tools will be in the "bin" subfolder, the JRE is installed in the "jre" subfolder, and the source code for the Java classes are in the src.zip file.
6. The documentation for J2SE is online here, but if you want local copies of the docs, you can download it from the same place except click the link in the section "J2SE 5.0 Documentation" instead.
7. After successful installation, the original exe file that you had download in the temp folder can be deleted.
1. You now need a servlet container. We will install Tomcat 5.5.9 (the reference implementation of the Servlet API) from the Apache's Jarkarta website. If you have a previous version of Tomcat installed, you must go and run uninstall.exe to uninstall it before installing the new version. Under the "Download" section, click the link Apache Tomcat 5.x. Then under 5.5.9 Binary, click the link 5.5.9.exe and save to temporary folder such as "c:\temp".

2. Run the executable. Do not checkmark "service". Otherwise Tomcat will start up every time you start windows.

3. For the location directory, change it to something like c:\tomcat55. This directory will be known as $TOMCAT_HOME.
4. Leave the default connector port at 8080. For your development environment, you can leave the password blank.
5. It will ask for the Java Virtual Machine path. Specify the directory of your JDK installed in the above steps.

6. At the end, there will be a checkbox asking if you want to start Tomcat. This will start up the Tomcat Windows service. Let it checkmarked, and click Finish.
7. You will see a green arrow icon at the status bar. This indicates that Tomcat Service has started. If you double-click on the system tray icon, it will bring up the "Apache Tomcat Properties" that will allow you to start and stop the service.
8. You can also tell if the service is up by going to http://localhost:8080 in your browser where 8080 is the port that you had entered in step 4. If you see the following page, then your service is up.

9. Click the link "Status" on the page. It asks for your username and password. Type in "admin" for the username. And the password is the one that you had entered in step 4.
10. Exit browser and shut down the service by clicking the Stop button as shown in Step 7. You should see that the system tray icon turned into a red square to indicate that the service has stop. If you go to http://localhost:8080, you will not longer get the tomcat page. You can get rid of the Tomcat icon from your system tray by right-clicking on it and and select Exit. This method that you have just seen is known running "Tomcat as a Windows Service". Most of the time we will not be running Tomcat like this. Instead we will be running Tomcat from the command prompt as in the next steps.
11. Bring up a command window and navigate to the bin directory of $TOMCAT_HOME. Type tomcat5.

If you see an Security Alert such as this, click Unblock.

12. When you see "Server startup in XXX ms", then Tomcat is running. You can confirm with http://localhost:8080
13. To shut down Tomcat, you simply close the command window.
14. After successful installation, you can delete the exe file that was originally downloaded in the temp folder.
1. Eclipse SDK 3.1 is an IDE to aid our development. This is where we will code and compile. Once you downloaded from the Eclipse website, unzip it into a directory such as c:\eclipse. This directory will be known as $ECLIPSE_HOME.
2. Eclipse does not have an install and uninstall program, it is a self-contained set of files located in $ECLIPSE_HOME. You can start eclipse by running eclipse.exe from that directory. When it first starts up, it will ask for the location of the workspace. Accept the default. This is just the location where Eclipse will save your project files. The first time, you will see a welcome screen, which you can close or you can go through the features denoted by the icons.

3. After installation, you can delete the original zip file in the temp directory.
1. MyEclipse is an Eclipse plugin software that is specifically designed to add development work J2EE Webtier applications. You can download at 30-day trial version from their site. However, you might need to register first. The version that you want to get is MyEclipse 4.0 M2.
2. Run the executable and follow its instruction.
3. There should be a MyEclipse shortcut added to your desktop. Run that, it will start up Eclipse with the MyEclipse workbench.
Register the Tomcat with MyEclipse
1. In Eclipse, select Window -> Preference -> MyEclipse -> Application Servers -> Tomcat 5.
2. Enter the paths to your Tomcat as shown. Select Enable and click OK in the dialog.
