Skip to content
May 28, 2009 / Narayan

Java Software Development Kit Installation (on Windows)

First of all if you have already java then uninstall that java and download Java Sdk from Sun Microsystem :
For download: jdk (Java Development Kit)
Then choose your appropriate Operation System and download and Install the *.EXE program

This is one of the tough point for  beginner to install java Beginner.

Some of the steps to maintain Path of Java compiler are given as follows:

STEP 1: Right click on My Computer and Go properties.

STEP 2: Dialogue  Box Appears (given in fig 1.1) Go to Advance Tab > Environment Variables..

Fig 1.1

Fig 1.1 A Dialogue Box of Advance Tab

STEP 3: Now in New Dialogue box (given in fig.1.2 )  You can click on New Tab for creating new variable

Fig 1.2 Environment Variables Dialogue Box

Fig 1.2 Environment Variables Dialogue Box

STEP 4: New Small Dialogue Box appears and there you need to type the variable name as PATH and for Value you      need to paste the \bin directory of Java development kit (jdk 1.x.xx). shown in fig 1.3.

fig 1.3 New User Variable

fig 1.3 New User Variable

STEP 5: Now click on Ok and run Command .

STEP 6: In command you need to type javac which output like in fig 1.4

1.4 javac in command

fig. 1.4 javac in command

STEP 7: If your output gives like fig.1.4 then you are able to compile your java source code by following ways


Also I need to tell dat the  we can set CLASSPATH at ENVIRONMENT VARIABLES  via DOS for  compiling java file;

Here are some steps for windows:

> Go to Command Prompt

> type : set JAVA_HOME=directory(path)_of_your_jdk (as on fig 1.5)

fig 1.5

fig 1.5

>now type : set CLASSPATH=%JAVA_HOME%\bin.(as on fig 1.6)

fig 1.6

fig 1.6

>Also you need to set CLASSPATH of your JAVA LIB(library).

>Type : set CLASSPATH=%JAVA_HOME%\lib (for library of java)

Testing either the compiler path , library is correct or not.

>Type : echo %JAVA_HOME% (displays the path of Java installed)

>Type : echo %CLASSPATH% (displays the path of your java lib, java compiler as well)

If every thing goes alright then compile java file through following ways via Command at DOS:

For eg: To compile HelloWorld.java
Type  : javac HelloWorld.java
Type : java HelloWorld

Outputs:
________________
HelloWorld!!!
________________

That almost Finished in Windows Java Compile !

If any problem occurs then comment me or just mail me!

Advertisements

8 Comments

Leave a Comment
  1. EJP / Jun 8 2009 4:01 am

    Why is there a step entitled ‘To SetUp Class Path’ when it doesn’t do any such thing?

    • Narayan / Jun 8 2009 7:22 am

      ok i had repaired dare too ….

      you can check it out

    • Narayan / Jun 8 2009 7:28 am

      can’t u see the steps for defining classpath of java

      right in Step 1,2,3,4….

  2. cotton.m / Jun 9 2009 2:06 am

    Simply terrible.

    That is you setting up your PATH. Your windows environment variable PATH has nothing. I repeat nothing to do with your classpath.

    And this is why sites like this are rubbish. Because you keep referring to classpath and have obviously know idea what that even is.

  3. EJP / Jun 9 2009 3:57 am

    Narayan, they are the steps for defining the PATH. Which is different from the CLASSPATH.

    If this is an indicationm of the quality of your site I would advise readers to try elsewhere. Such as the Sun documentation for a start.

  4. Narayan / Jun 9 2009 11:09 am

    isn’t this the way of defining path of java

    Or should i post addition with other method?

    i.e From CLASSPATH via command

  5. Narayan / Jun 9 2009 2:10 pm

    ok i’ll also add some posting of CLASSPATH
    i know abt dat too…….

  6. safari1 / Nov 27 2009 12:37 am

    svp le jcreator version 4.50 pro comment je peut réaliser des forme est ce qu’il faut un ide et quoi le ide que je fait

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: