Glass Onion Blog

Cheat sheets, post-its and random notes from the desk of a programmer

Archive for the ‘Windows’ Category

Creating Linux style symbolic links in Windows Vista

Posted by walrus on July 18, 2008

Windows Vista supports symbolic links (soft links). One way of creating these links is using the command line utility called MKLINK.

Run Command Prompt and type the comman MKLINK.

If the system warns saying…“You do not have sufficient privilege to perform this operation”. Run the Command Prompt as Administrator

Usage:

MKLINK [[/D] | [/H] | [/J]] Link Target
        /D      Creates a directory symbolic link.  Default is a file
                symbolic link.
        /H      Creates a hard link instead of a symbolic link.
        /J      Creates a Directory Junction.
        Link    specifies the new symbolic link name.
        Target  specifies the path (relative or absolute) that the new link
                refers to.

Example: To create a directorty link called src what points to c:\users\foo\src

     mklink /D src c:\users\foo\src
Thats it!

Posted in Software, Technology, Windows, linux | Tagged: , , , | 1 Comment »

Building with Ant from TextPad

Posted by walrus on July 3, 2008

A step towards making TextPad a lightweight IDE. Using the trick below, you can compile your code using Ant from inside TextPad. Click on the error messages and jump to the source file and the problematic line of code.

  1. First, make sure you can compile from the command line using Ant
  2. In Textpad, go to Configure-> Preferences-Tools.
  3. Click on the Add button and select the Dos Command option
  4. Enter ant -find in the edit box and press OK to dismiss the dialog box.
  5. Now press the Apply button
  6. In the left pane, expand Tools and highlight ant -find
  7. In the right pane, select capture output and save all documents first options
  8. Enter the following Reguar Expression ^[ \t]+\[javac\] \([A-Za-z]:[^:]+\):\([0-9]+\):
  9. Set File to 1 and Register to 2

All done. To run Ant, select it from the “Tools” menu. The build.xml file should be in the same directory, or in any ancestor directory.

Posted in Apache, Software, Technology, Windows, java | Tagged: , , , , , , | 1 Comment »