June 4, 2009

Essentials for Programming in Java

Java programming is basic for every programmer.

There are two ways to use java in a PC for Programming

Using IDE:

If you are using any IDE Like Eclipse , Net Beans

Install the Java Runtime Environment (JRE)

Download JRE

This would suffice.

Using System Editor:

If you want to code manually

Download JRE
Java SDK

Now you can use the System Editor to Code Java

Compile with javac filename.java
Run with Java filename


The Second method of running java has a Special Constrain.

All the source files must be placed in BIN folder of Java.

If you wish to place the source files some where else (base folder), you need to set path.

Setting Path for Java:

1. Open Command Dos Prompt (Windows + R and Type cmd)

2. Navigate to the folder where you want to work out your files.

If you want all your programs to be in D:\Java Programs

use cd D:\Java Programs

3. Asuming that your Java is installed in C:\Program Files\Java\Java SDK 1.4\Bin

then set path as

set path = "C:\Program Files\Java\Java SDK 1.4\Bin";

4. To check whether the path is set correctly, type java in Dos Prompt and Press Enter.

You will see the java help file.

1 comment:

Mamta Soni said...

Your blog is very informative and gracefully
your guideline is very good.Thank you
Regional pharmacy college
deepshikha group of colleges