Since I have been enjoying using Aptana for Rails development I dicided I wanted to try it's mother project Eclipse for some embedded C work. I downloaded Eclipse as a huge zip file which I unzipped in a directory called c:\eclipse since Vista wouldn't let me put it in c:\Program Files.
I couldn't find any easy installation instructions so I tried running the executable c:\eclipse\eclipse.exe and was told it couldn't find the file c:\eclipse\jre\bin\javaw.exe. I poked around and found a java runtime environment in my aptana install, again in a jre subdirectory. I thought about copying this to the eclipse subdirectory but was shocked to see that it is 80M! A profligate waste of disk space if ever I saw one.
Instead of copying I decided to exploit a new Vista feature: junctions. These are roughly equivalent to unix symbolic links although they aren't exactly the same as Windows has to do everything differently.
I wanted an easy way to create junctions so I downloaded this command line tool from those corporate sellouts at sysinternals. Like all the other sysinternals tools I have used, this was incredibly simple and Just Worked.
C:\eclipse>junction jre "\Program Files\Aptana\Aptana IDE Beta\jre" Junction v1.05 - Windows junction creator and reparse point viewer Copyright (C) 2000-2007 Mark Russinovich Systems Internals - http://www.sysinternals.com Created: C:\eclipse\jre Targetted at: C:\Program Files\Aptana\Aptana IDE Beta\jre C:\eclipse>
This created a junction called jre in the eclipse directory that pointed to the jre directory in the aptana directory. I tried the eclipse.exe file again and now I was up and running: with the junction eclipse thinks it has it's own copy of the java runtimes to play with but in reality it is using the Aptana copy.


I believe that the NTFS file system has always had junctions (Win2000, XP) these are the same beasts in Vista, right !