1.Setup java in your computer
java in your computer how to installed .run and compile all java .class file in your computer and make application.Java run your windows computer first we needed
- Java Development Kit
- Java runtime Enviroment
Click here
I am pretty sure there are numerous similar resources out there, I just thought to add one more. Hope you find it handy. It is really easy, so don’t be afraid of the this post’s size, I just tried to elaborate on some simple steps, but for sure it is not rocket science and you don’t have to be a ‘hacker’ in order to complete all the steps. You may not need all the tools below, so it is not necessary to have them all installed at once.
Setup Java
- Setup Java JDK and JAVA_HOME (this is a must)
- Setup Apache Ant and ANT_HOME (optional)
- Setup Apache Maven and MAVEN_HOME (optional)
- Setup SVN (subversion) support, using TortoiseSVN (optional)
- Setup Git using Git Extensions (optional)
- Setup a Java IDE, Netbeans or Eclipse (this is a must)
I assume that you have not installed any related tool before, and your system is ‘clean’ from Java and other Java development tools. So I guess, if you open a Command Prompt and you type ‘java -version’ you will get something like the following.

We need to install the Java Development Toolkit aka JDK, which is bundled with the Java Runtime Environment. At this moment, the latest JDK versions is JDK 8 All you have to do is head to the main download page provided by Oracle (here) , and download the latest version that you will find. The direct link for the JKD 8 u18 is here.Start the installer and go through the steps. The images were taking whan I was installing JDK7, the same applies with the latest
Tip: One small tip or let’s say a deviation from the installer that I prefer, is to change the installation path provided by the program to something easier to remember or even type in the command line tool. So instead of installing the JDK to ’C:\Program Files\Java\jdk8_18’ etc, I always choose something that looks like the following, ’C:\Java\jdk18
I do the same when the installer prompts me to install the JRE (java run time) and I provide the following path ’C:\Java\jre8’. When it is complete, I open a new command line and I re-type ’java -version’ as before. As you can see the installer has already done a good job and I have java in my environment. (You may use the ’where’ command to find out which executable is loaded on the Path - (similar to ’which’ in Unix) ).

Open your Advance System Settings ( Press Start , type in the search box ’View Advanced System Settings’, open it, select the tab ’Advanced’ and press the button in the bottom called ’Environment Variables’). Add a new system variable as it is illustrated below. The name is JAVA_HOME and the path is actually the path our JDK installation, in my case “C:\Java\jdk18’.

Press OK, and open a new Command prompt ( it is required). Type 'echo %JAVA_HOME%’ and you are done.

2. Setup Apache Ant and ANT_HOME
Apache Ant is a popular build tool used in many Java projects and it is still needed in many cases when you need to setup some servers or complex projects. You can find more about Ant here. Installing Ant is easy, there is no fancy installer just a zip file you need to extract somewhere and add a similar variable like JAVA_HOME (see above) called ANT_HOME.
At the time being, the latest version of Apache Ant is, 1.9.4. and can be downloaded here. After downloading the zip file, I choose to extract the contents to a similar path like before ’C:\ant194’. (make sure that c:\ant184 is the root folder and then you have all the sub-folders like c:\ant184\bin’.
Setting ANT_HOME is similar to JAVA_HOME, add a new system variable named ANT_HOME and value the path where you have the ant zip extracted in my case 'C:\ant194’. See below

In order to add the 'ant’ command to our executable path we need to update the PATH system variable, in the very same window, as illustrated below, just hit 'Edit’. Go to the end of the line and add a new entry (all the entries are separated with ’;' ). The path for the ant executable is ’C:\ant194\bin’ but we will use the ANT_HOME variable in order to be more flexible so we will add, %ANT_HOME%\bin”. See the image below.

You are done, open a new Command Prompt, and type ’ant -version’, or ’echo %ANT_HOME%’ you should get similar results are illustrated in the image below.

Congrats, you have successfully installed Apache Ant! Some Java IDE’s have Apache Ant already per-bundled (as we will see in a later section) but I truly believe it is better to be installed manually,it is cleaner and easier to maintain, update.
0 Comments:
Post a Comment