Friday, November 2, 2012

Add GWT SDK to Your System PATH

Adding GWT SDK into you system path undoubtedly is convenient if you frequently manipulate GWT with command line. But I don't like this. There are too many things in system path already. I still remember it dazzled me last when I was trying to edit it.
I'd like to find another way to add it into system environment without changing PATH system variable and let it as simple as running cmd command.
Well,if you follow steps below you can accomplish the object above.
1. Create a cmd file, named gwtcmd.cmd

  1. @ECHO OFF  
  2. SET GWT_HOME=<GWT_SDK_DIR>  
  3. SET PATH=%PATH%;%GWT_HOME%  
  4. CMD /k "ECHO Welcome to Google Web Toolkit command-line for GWT<GWT_VERSON>!"
2. Copy this file to C:\Windows\System32
3. Win Key + R, type gwtcmd, enter. 
Now you can use GWT command line anywhere in your local. gwtcmd is only three letters more than cmd. The price is not too large.



No comments:

Post a Comment