Pages

Sunday, January 15, 2012

Setting Java Path

Seems like many are having troubles with setting the Java path in Windows. So thought of writing some tips regarding the common issues the students came across.


  • To see if JDK is installed, type 'java' in command prompt and enter.
If it is installed you will get a message like above. If not try installing the JDK. Or if you are sure it is already installed try setting the path (see below).


  • Use 'javac' command to see if the path is set.
It will display like above if the path is set. Otherwise it will say something like:


In that sort f a situation you need to set the path. Setting path means you are locating the java compiler to compile java programs.



  • Setting the Path
In cmd type the path for the bin folder of jdk you installed as below:



► It is highly recommended to use the tab key to generate the path than type it manually to avoid spelling mistakes.

► Make sure you do not keep spaces before or after the '=' sign

► Try 'javac' command again to confirm that you set the path correctly.

► A path may exist only for that particular command prompt. Once you open a new cmd you will have to set the path again.

► To avoid setting the java path again and again you can create an environment variable for the path. (Will explain later..)

Monday, January 9, 2012

Getting Started with Java


When you are learning Java at the campus it is always better to have a way to try what you learned when you go home. You need to download and install the JDK (Java Development Kit) on your PC to run Java programs in command prompt. 

Java was belong to Sun Microsystems earlier but now it is a property of ORACLE™. You can download the JDK from their website. The latest version available by now is jdk 1.7. The installation weighs around 90MB (the x64 version).

When downloading the installation just make sure you get the JDK (not JRE) and also once you clicked on the package don't forget to accept their licence agreement and get the installation relevant to your PC's OS.

Once you download it run the installation and set the path in command prompt and you are ready to execute and run Java programs!

Good Luck!

Sunday, January 1, 2012

New Year - New Life..



The new year started. I am starting a new life from tomorrow. Started to write this blog as a SLIIT student and now I am a student instructor. So now I can continue the blog even better than earlier. Let's hope I'll have time for that!
Wish You all a Happy, Peaceful and Precious Life ahead!