To use java tools (javac, java, applet viewer etc.) from anywhere in the dos prompt java should be configured. Suppose that you have already installed java and the installed path is "c:\j2sdk1.4.0" and you have installed windows to "c:\".

Java can be configured both temporary and permanently. Note that the temporary configuration will only limit to the dos windows we used to configure.

So first of all let's see how to configure temporary.

STEP 1: Open dos prompt (Click on Start then Run, type "cmd" and press Enter).

STEP 2: Issue the following command and press Enter.
set path=c:\j2sdk1.4.0\bin;

That's all you have to do and now you can use any java tool from anywhere in the dos prompt.

Next we'll see how to configure java permanently.

STEP 1: Select AUTOEXEC.bat file, right click the mouse button and click on edit.
(AUTOEXEC.bat file is in "C:\" and it's hidden by default. So to see it you have to select "Show hidden files and folders" and disable "Hide protected operating system files (Recommended)". Click on OK. This will ask for confimation and click on Yes.

STEP 2: Enter the following two lines and save the file
set path=c:\j2sdk1.4.0\bin;
set classpath=c:\j2sdk1.4.0\lib\classes.zip;

STEP 3: Select My Computer, right click the mouse button and click on properties. Click on the Advanced tab. Click on "Environment Variables".

STEP 4: Click on "New" in the "System variables" section on "Environment Variables" dialog box.

STEP 5: Enter Variable name and variable value as follows on the "New System Variable" dialog box.

Variable name: set path
Variable value: c:\j2sdk1.4.0\bin;

Click on OK.

STEP 6: Repeat STEP 4 and enter varible name and variable value as follows on the "New System Variable" dialog box.

Variable name: set classpath
Variable value: c:\j2sdk1.4.0\lib\classes.zip;

Click on OK.

STEP 7: Click on OK and again on OK.

STEP 8: Restart the computer.

Now you have configured java permanantly.

Special thanks to Mr.Kooragoda @ IDM Galle branch
5

View comments

  1. Anonymous1:50 PM

    First of all when configuring for the current session a better method to use is path = %path%;"{path_to_bin_directory}; (No need of the set word since path is already defined. Check it before doing this) This will preserver the current path
    Second when adding the path permanently
    The method discribed using a autoexc.bat is when using windos 9x. The way to set it in Windos XP is to add it in to environment variables. The variable is path not set path.
    And finallly there is no need to set a explicit classpath for the standard library classes in newer versions of Java. Including 1.4. (But early ones it should be)

    ReplyDelete
  2. Anonymous5:10 PM

    I think you are right Uthpala
    i was bit confuse regarding OS as i am using Windows XP and Mr. Kalpa didn't mension about Operating system because when we configure for Window 9X varible name "set path" is used... and not for Xp..

    ReplyDelete
  3. thanks for your info..
    i managed to set up the environment after searching here and there..
    i have done it before but u know sometimes we forget..but after refer here i managed to do it..thanks for your info...

    ReplyDelete
  4. @User
    Your welcome
    Yeah, most of the time we do it once and after we keep on coding. So that the chance to practice is less :-)

    ReplyDelete
  5. Anonymous11:21 AM

    A SUPPORTED BY THE DEVELOPER TOOLS? It was interesting. You seem very knowledgeable in ypour field.

    ReplyDelete

A late announcement, a little more than 2 years, I moved to Medium. I won't be making any new posts here in this blog. Please refer/follow https://medium.com/@callkalpa for the latest articles.
0

Add a comment

About Me
About Me
Subscribe
Subscribe
Popular Posts
Popular Posts
  • "The Snare is a poem which evokes positive attitudes within the reader." (1) Which kind of attitudes are evoked? (2) Show them wit...
  • "Island Spell" by Wendy Whatmore vividly describes a beautiful island. The starts her poem saying that she was caught in an island...
  • Try configuring your SLT ADSL connection yourself. Don't WASTE money for SLT . Here are the settings. Type : PPP...
  • To use java tools (javac, java, applet viewer etc.) from anywhere in the dos prompt java should be configured. Suppose that you have already...
  • A late announcement, a little more than 2 years, I moved to Medium. I won't be making any new posts here in this blog. Please refer/foll...
  • SOURCE: http://www.avidtrader.com/wordpress/wp-content/uploads/2013/01/reports.jpg Recently I was involved in developing a registration...
  • Welcome to WSO2 Application Server 6.0.0, the successor of WSO2 Carbon based Application Server. WSO2 Application Server 6.0.0 is a complet...
  • I recently came across this requirement where a  xsd:datetime  in the payload is needed to be converted to a different date time format as ...
  • Dialog GSM offers its latest service,Budget SMS, to both post paid and pre paid customers. With this service you will be able to send D2D SM...
  • Photo Credit : Prima Yogi FAD Singapore 2015 was held on 5th and 6th of December in Singapore and I participated at the event. FAD (F...
Labels
My Links
Blogs I read
Blogs I read
Loading