including multiword directory names in path specifications, environment variable settings, etc.
Posted on 2012-09-01
I have some scripts that need to obtain the value of the Environment Variable 'JAVA_HOME'. The fact that the value of this variable on my machine includes "C:\Program Files" appears to cause problems for the scripts I'm trying to run. So I see error messages with the complaint that the file location "C:\Program" cannot be found. I've tried surrounding the value of 'JAVA_HOME' with quotation marks in the listing for this variable in the Windows Environment Variables, but this did not resolve the problem. This seems like it must be an old, classic Windows system complication (having multiword names for important system directories like 'Program Files'), so I'm thinking there must be ways to deal with this problem that others have come up with. If anyone here has any suggestions for this, please let me know.