Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need a way to locate the installation folder for Eclipse in a Power Shell script. Can this be done? It doesn't seem like Eclipse leave any trace in the registry, environment or Windows Installed programs list, but I might be wrong. I've seen mentions of the environment variable %eclipse_home% but it is not set on either of my two Eclipse Juno installations, so that doesn't seem reliable.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

As Eclipse doesn't really perform an install, as such -- works by point & click -- there is no way to do this effectively without searching the entire drive. You can easily rename or move the folder, and it will still work as designed; you could even put it on a stick.

This question details where the Eclipse folder -might- be placed, and that it can be unzipped to any location you want to use (and that different people prefer to use different locations): http://stackoverflow.com/questions/2414181/in-windows-where-should-the-eclipse-folder-be-placed

So the only methods that will effectively work are to use commands to search the entire drive for one of the files. And that would seem to be a tedious way to find something.

There is a good explanation at http://stackoverflow.com/questions/8677628/recursive-file-search-using-powershell re. how to search recursively in Powershell using Get-ChildItem.

share|improve this answer

If the folder it is installed to is included in the PATH you can find it using where to search for one of the eclipse files. Can also use it to search other directories but it will be slower the wider you expand the search.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.