Setup your Java Working Space
Welcome again,
This morning, my exciting class had came and I had a lot of work. The biggest thing that I should take a note is how to setup my working space with Java.
When I started to work with Java – setup my first environments. I got many concepts that cannot seperated. It made me so confused. After this morning class, I stay at school to setup my working space. And, you know, I had to installed and re-installed 3 times to get well-done my space. Gruuu!!! Let it be. Here is my work:
Objectives: Installing the java working environment in Windows Vista Home Basic. Here is components wished to installed:
- JDK6 (Java SE Development Kit 6) – download at 25th, Feb 2008: this is a toolkit for development – as its name ^^
- JRE6 (Java Runtime Environment 6) – download at 25th, Feb 2008: this is needed enviroment for running java (java classes, java applications, …)
- Apache Tomcat 6.0.16: this is a servlet container that uses for Java Servlet and Java Server Pages technologies.
- Apache Ant 1.7.0: this is a Java-based build tool. In theory, it is kind of like Make, without Make’s wrinkles and with the full portability of pure Java code. (source: http://ant.apache.org/faq.html#what-is-ant )
- Java Doc: java documentations – how working with Java language.
- junit 4.4: this is a testing framework when working with Java language.
- Java Tools: install some helpful tools when working with Java.
Step by steps:
1. Pre-Installation:
Before starting install your Java Working Space, you should make sure about some points:
- Remove all the older version of Java (I’m not sure about the conflict between versions cause this version of Java – v6 – has some new features).
- Follow this recommend about the installation’s structure: this will make your space becomes more clearly:
+ Create the folder named: “appl” right inside the “C:” folder. All the installation will put here.
+ Create these child folder of “appl” folder:
~ “jdk” folder >> C:appljdk
~ “jre” folder >> C:appljre
~ “Tomcat” folder >> C:applTomcat
~ “Ant” folder >> C:applAnt
~ “junit” folder >> C:appljunit
~ “tools” folder >> C:appltools
2. Intall JDK 6 and JRE 6:
This is the step that I stucked because of the changing way of install from this JDK version. You download the “jdk-6u4-windows-i586-p run.exe” and double clicks to start the installation.
Go through the steps to install JDK. REMEMBER changing the PATH points to “C:appljdk” at the first step. See those figures below:
- Lisence Agrrement: Choose “Accept”
- Custom Setup: change the Path in this step. Then click “Next”.
- Installing: wait wait wait. ^^
- After few minutes, the installtion will stop at the moment to takes toyou to the JRE setup step. Remember to change the Path to: “C:appljre”. Then click “Next”.
- Installing… wait again ^^.
- Once more… until the installtion finish ^^
3. Install Apache Tomcat:
Go to apache’s website, download the “apache-tomcat-6.0.16.zip”.
Copy the .zip file to the “C:applTomcat” folder, extracting it (Extract here…)
After extracting, you’ll get the folder like this: “C:applTomcatapache-tomcat-6.0.16”:
4. Install Apache Ant:
- Go to apache-ant’s website, download the “apache-ant-1.7.0-bin.zip”. Copy the .zip file to the “C:applAnt” folder, extracting it (Extract here…):
After extracting, you’ll get the folder like this: “C:applAntapache-ant-1.7.0”

5. Install Java Documentations:
Go to Sun’s website and download the latest documentation. I use the “jdk-6-doc.zip” file. Copy the .zip file to the “C:appljdk” folder, extracting it (Extract here…). After extracting, you’ll get the folder like this: “C:appljdkdocs”:
6. Install junit 4.4:
Go to http://www.junit.org to download the latest version of junit. I use the “junit4.4.zip”. Copy the .zip file to the “C:appljunit” folder, extracting it (Extract here…). After extracting, you’ll get the folder like this: “C:appljunitjunit4.4”:
7. Install Java Tools:
In this case, I recommend you to install one of these tools: JCreator and NetBeans IDE.
+ The newest version of Jcreator is 4.5.0. Just follow through steps of installation. Remember change the install path to: “C:appltools”:
NetBeans IDE: I use the version 6.0.1.
8. Configuration Work Space:
You’ve finished the installation your own Java Work Space. Now, spend a few minutes to make sure that all these work. You need to have permission to entry the Environment Variables:
- Right click to: My Computer >> Propoperties
- Choose Advance System Setting. At the tab “Advance”, choose “Environment Variables”.
+ In the space “System Variables”: create 2 new variables like this:
+ Add this value to the end of Path variable: ;C:appljdkbin. Remember the “;” before. It uses to seperate this variable to all variables ahead. The rest points to bin folder of installed JDK. This step will help you when compling any .java file from everywhere.
+ Variable Name: JAVA_HOME that has the Value C:appljdk
+ Variable name: ANT_HOME that has the value C:applTomcatC:applAntapache-ant-1.7.0
(Note that the value of 2 variables point to the “home” folder that install Java and Tomcat: jdk and Ant folder)
+ Check your configuration:
~ Run the “cmd”. Type “javac”. If the configuration is correct, all the Useage for this command will be listed.
~ Run the “cmd” again. Move to the Tomcar installation folder. ( in this case, the path is: C:applTomcatapache-tomcat-6.0.16/bin >> use “dir” command to list all the file inside bin folder. Type: “startup.bat”. If your configuration is correct, another command promt from Tomcat will display. This’s also the command to start Tomcat. ^^
~ Open the broswer, type “http://localhost:8080 in the address bar. The successfully page will display (with a cute cat ^^)













[...] 2. Java installation: see previous article at http://vanganhxinh.wordpress.com/2008/02/25/setup-your-java-working-space/ [...]
How to establish the connection to the MySQL database? « Vanganhxinh’s Weblog said this on June 22, 2008 at 5:05 pm |