Friday, January 14, 2011

Setting up JDK (Windows)

Hello folks, now you are going to learn how to setup JDK to compile using "javac" and run the compiled class using "java".  You can download JDK from here.
Note: The arrow points where you should click.

1. Download


2. Open the downloaded file



2. Install JDK








3. Now you can compile your source code, but not comfortable. You need to change the location every time.




4. To fix that go Start > Control Panel


5. Double click on System

6. Go to Advanced tab







7. Click on the Environment Variables button


8. In the User Variables click New




9. Set 
         Variable name: Path 
         Variable value: C:\Program Files\Java\jdk1.6.0_23\bin
    
  •    Note: Variable value depends on the location you have installed. The ordinary value is like this
                       location of Java \ jdk folder with the version\bin

10. Now you can compile very easily.

That's it. Enjoy !!!

Sunday, January 2, 2011

Reinstalling grub boot loader

This post is only for the Linux users. If you want to use Linux with Windows you need to install a boot loader. Most of the latest distros provides a boot loader (ex: grub) and it installs automatically with the OS. If you install Windows after installing Linux the boot loader will disappear, in other words, you are unable to load Linux OS. To solve this problem you need to reinstall grub boot loader. First of all, you need to find a live Linux CD and boot it without installing. ( http://www.livecdlist.com )

1. Open a terminal and log in as root.
:~> su -
or use "sudo"  

               
2. run grub
 :~# grub
or :~> sudo grub

3. finding master boot record
grub> find /boot/grub/stage1

4. If you know where the master boot record
grub> root (hd0,6)

5. Setup the boot loader
grub> setup (hd0) 
grub> quit

 Now you can have both operating systems.