Java

..........Welcome to Java Development..........


Java is a general-purpose computer programming language that is concurrentclass-basedobject-oriented, and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere

Now Setup your Java Development Environment in "Windows 7"


I have been receiving a lot of requests over the time, from students and people willing to experiment with the Java language, on providing a simple guide on how to setup a Java development environment...So must be following the given bellow step:

1. Setup Java JDK and JAVA_HOME

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.
The path is required to be set for using tools such as javac, java etc.
If you are saving the java source file inside the jdk/bin directory, path is not required to be set because all the tools will be available in the current directory.
But If you are having your java file outside the jdk/bin folder, it is necessary to set path of JDK.
There are 2 ways to set java path:
  1. temporary
  2. permanent

1) How to set Temporary Path of JDK in Windows

To set the temporary path of JDK, you need to follow following steps:
  • Open command prompt
  • copy the path of jdk/bin directory
  • write in command prompt: set path=copied_path

For Example:

set path=C:\Program Files\Java\jdk1.6.0_23\bin
Let's see it in the figure given below:

how to set path in java

2) How to set Permanent Path of JDK in Windows

For setting the permanent path of JDK, you need to follow these steps:
  • Go to MyComputer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok

For Example:

1)Go to MyComputer properties
how to set path in java
2)click on advanced tab
how to set path in java
3)click on environment variables
how to set path in java
4)click on new tab of user variables
how to set path in java
5)write path in variable name
how to set path in java
6)Copy the path of bin folder
how to set path in java
7)paste path of bin folder in variable value
how to set path in java
8)click on ok button
how to set path in java
9)click on ok button
how to set path in java
Now your permanent path is set.You can now execute any program of java from any drive.

Setting Java Path in Linux OS

Setting the path in Linux OS is same as setting the path in the Windows OS. But here we use export tool rather than set. Let's see how to set path in Linux OS:

export PATH=$PATH:/home/jdk1.6.01/bin/
Here, we have installed the JDK in the home directory under Root (/home).

No comments:

Post a Comment