Environment Consistency – Directories (Windows)
We need to make our life easier by creating consistency for every machine. What this means is every machine you try to use, whether it be yours or your colleagues, the environment will be the same when you sit down to help them with something. This is very important if you’re a Development Manager and you’re trying to help one of your staff.
This is one of several posts in regards to this subject.
As I mentioned, I support both a Windows environment and an Apple Mac environment and we have a different way of handling our “directories” for each environment. We’re going to talk about Windows here.
There are two “directories” that are important when developing our software. There is the “NetBeansProjects” directory and the “NetBeansLibraries” directory.
When NetBeans installs for Windows, it creates a directory called “NetBeansProjects” in your “My Documents” directory. Now to keep things consistent we need to do something extra on each machine.
Windows has an old DOS command called SUBST which “Associates a path with a drive letter.” Using this command we can fix it so that where ever our NetBeansProjects directory is created we can consistently associate it with the driver letter X:. This is done by executing the following command at the command line:
SUBST X: “H:\My Documents\NetBeansProjects”

The SUBST Command
You’ll notice that my “My Documents” directory is located on the H: drive. Fortunately for me, this directory is located on the main file server at my work place and is synchronized each time I log on to the network. This means when I disconnect from the network, I can still work on my projects and then when I connect, everything will be backed up to the file server (which then goes to tape). I don’t want to go into further detail about this here, talk to your System Administrator about setting this up for you.
If you can’t get them to create this for you, then you’ll be putting your files (probably) on your C drive somewhere. I’ll show you in a later post how to set up Subversion to manage your source code but even then, you could have a hard drive failure and lose a couple of days of work. Having your files synced to the file server is the best way to go.
Now, everyone that uses Windows, when they are using NetBeans, should create projects in X:\NetBeansProjects, NOT in H:\My Documents\NetBeansProjects. Sounds stupid but it helps, trust me.
Now typing in the SUBST command each time you reboot your machine isn’t exactly my idea of fun. So create a batch file for it (put that line in a file and save the file at c:\substx.bat) and then create a “Windows Shortcut” to c:\substx.bat in your Startup folder. That way it’ll run each time you reboot.
The NetBeansLibraries directory is going to be associated with our Q: drive. Our Windows Administrator helped us out again here by creating a special share for us called developers$. Our file server is called “snake” so our special share is located at \\snake\developers$. We map this drive using Windows Explorer. So start Windows Explorer and click on Tools and then click on Map Network Drive. A Window will come up and the information in it should look similar to the following:

Windows - Map Network Q Drive
After you’ve done this, you need to make sure it’s going to synchronize and be available offline. Again in Windows Explorer, right click on the Q drive and there should be an option for “Make Available Offline”. Make sure it’s checked like so:

Windows - Make Available Offline
If you don’t see this option go talk to your Windows Network Administrator so, he can “hook you up”. We’ll talk about managing the Libraries in a later posts.
No comments yet.
Leave a Reply
-
Recent
- HSQLDB – What a piece of …..
- Environment Consistency – Apache HTTP Server (Windows)
- Environment Consistency – MySQL (Windows)
- MAMP
- Environment Consistency – Verify PHP to MySQL Connectivity (Apple Macintosh)
- Environment Consistency – PHP/MySQL Configuration (Apple Macintosh)
- Environment Consistency – MySQL (Apple Macintosh)
- Environment Consistency – PHP (Apple Macintosh)
- Environment Consistency – Sync Directories
- Environment Consistency – Directories (Windows)
- Environment Consistency – Directories (Apple Mac)
- Environment Consistency – NetBeans (Windows)
-
Links
-
Archives
- June 2010 (1)
- January 2010 (1)
- December 2009 (4)
- November 2009 (5)
- October 2009 (5)
- September 2009 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS