1

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.

2

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): https://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 https://stackoverflow.com/questions/8677628/recursive-file-search-using-powershell re. how to search recursively in Powershell using Get-ChildItem.

1

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.

1

On Windows 10, you can use the following steps:

if you have an Eclipse shortcut, which you can find through the Windows 10 search bar with the search parameter, Eclipse, or maybe your desktop, then go to your Eclipse shortcut. Next, right-click your Eclipse shortcut and select the command, open file location. This shall bring you to the main executable file and its other files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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