Sunday, June 13, 2010

Java : Setting Path Forever in Java

Its always a tedious task to set path in java every time we restart our pc. Here is how to do that once so that u don't need to do this boring process again.

Steps :

1) Go to System Properties (Shortcut : Press Windows Key + Pause Break).
2) Now Go to "Advanced" Tab.
3) Click on Environment Variables... (See Image Below,Click to Enlarge ) .

4) Under "System Variables" scroll to "Path" and click "Edit".

5) Now what is present in that leave it as it is ( Don't delete any thing but just add after that) and add the following which is in quotes(without quotes) {As shown in image} :

";C:\Program Files\Java\jdk1.6.0\bin"
6)Note:Replace the above line with your path of jdk but add a semicolon first as i have done above
7)Click Ok,Again Ok,Again OK.

You are done.....

Friday, May 28, 2010

Stupid Tip : Getting your screen resolution in Windows

Sometimes we need to know our screen resolution . There are 2 ways :

1st way) Right Click in an empty area on desktop & Click on screen resolution.
2nd way ) Open run dialog (Press winkey +R).
* Type dxdiag & Click OK.
* Goto Display tab to get screen Resolution.
Have Fun......

Saturday, May 22, 2010

Java : Adding 'Compile Program' Option to Context Menu for Java Files

Java programmers & students always find it a tedious process to open command prompt,set path & then compile the program.Here's how to get a compile program option in Context Menu so that we can compile from right click & know the errors in the program.
* Start Notepad & type the following (Note:Replace "c:\program files\java\jdk1.6.0\bin" with your path of JDK).
   @echo off
 path=%PATH%;C:\Program files\Java\jdk1.6.0\bin
 javac "%1"

* Save this file as "compile.bat" & copy this file in c:\windows.
* Open registry editor : Press Winkey + R(Run) & type "regedit.exe".
* Goto "HKEY_CLASSES_ROOT\java_auto_file\shell"
* Right Click on "shell" key & choose New - Key.

* Type Key name "compile".
* In right side pane double click on Default & type "Compile Program" & click OK. 

* Now right click on "compile" key  & click New - Key.

* Type key name as : "command" (without quotes).
* Click On command & in right side pane double click on Default & type : C:\Windows\compile.bat "%1"

* U get the Compile Program option for java files.

* Restart UR Pc
* Have fun..........

Shortcut to Do this :
 For some reason if you are unable to do the above process.Perform steps 1 & 2 & then download this zip  file & double click on reg file in it to add keys to registry for u.

Thursday, May 20, 2010

Windows 7 : Adding MyComputer shortcut to windows 7 taskbar/superbar

In Windows 7 we have an explorer shortcut in  the superbar which opens up in "Libraries".We always want have a shortcut in Superbar which would Open up in "My Computer".
Here is how to do so :
* First step is to delete that bad Libraries shortcut.
* Right Click On libraries shortcut & choose "Unpin this Program from taskbar".
* Now Right Click On desktop & choose New - Shortcut .
* In shortcut location type "C:\Windows\explorer.exe shell:MyComputerFolder".

* Click Next & Type shortcut name as "Computer".
* A shortcut to My computer comes on Your Desktop.
* Now Right Click this icon on desktop and choose "Properties".
* Click On Change Icon .
* To get My Computer Icon browse to file : "c:\windows\system32\imageres.dll".
* After Choosing My Computer Icon Click OK - Apply - OK.
* Now Right Click On This Icon & Choose Pin To Taskbar .
* U get My Computer in taskbar.
Have Funnnnnnnnnn.............................

Sunday, May 16, 2010

Registry Trick : Adding 'Edit With Notepad' for every file in Right-Click Menu

Usually we open an unknown file type with "Notepad" so it would be nice to add "Edit with Notepad" option in right click menu of every file type.
Here we go :
* Open Run Dialog (Press Window Key + R).
* Type regedit & press enter

* The Registry Editor Opens Up.
* In Registry Editor goto "HKEY_CLASSES_ROOT\*\shell" .
* In right side pane right Click : New - Key.
* Type : 'Edit With Notepad' (without quotes) as key name .
* Now Click On 'Edit with Notepad' key and in right hand pane right click : New - String Value.

* Type Value Name : Icon
* Now Double Click 'Icon' string value and type : "notepad.exe,0" as value data.

* Right Click On 'Edit With Notepad' Key .
* Choose New - key.
* Type Key Name -  command.
* In right side pane of command key double click 'Default' and type : notepad.exe "%1" (With Quotes).
* Click OK.
* Close Regedit.
* Now Right Click Any file & u have edit with notepad option for it.
Have Fun...
For simpler option download the registry file to do all this for you....
Download here

Windows 7 : Disable Aero Peek In Windows 7

Aero peek : A feature in Windows 7 which makes all open windows transparent when mouse is hovered over the little rectangle in bottom right.
Here is how to disable Aero Peek :
* Open Run Dialog (Press Winkey + R).
*Type Regedit
*Move To : HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM.

*In Right Side Pane Double Click on "Enable Aero Peek" as in above image.
*Type Value As 0.

*Aero Peek Is Disabled.
Have Funn....


Download the registry file to do this for u

Registry Trick : Adding 'Control Panel' Option to 'My Computer'

Registry Trick : Adding 'Control Panel' Option to 'My Computer'
It is always handy to have an assortment of shortcuts as 'Control Panel' in My Computer.Here is how to do so :-
*Press WinKey + R (Opens Run Dialog)

*Type "regedit" (without quotes)
*The Registry Editor Opens Up.

*Goto "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace" .
*In right hand empty space : Right Click and choose New - Key.

*Type Name as : "{21EC2020-3AEA-1069-A2DD-08002B30309D}" (without quotes)

*Close Regedit.
*You get Control Panel in my computer.

 Have Funnnn.............


Download reg file to do this.