What folder should I install Eclipse to on Windows? - windows

I'm running Windows 7 with UAC enabled. I've always found it weird that Eclipse doesn't use an installer and doesn't use the AppData folder to store its data in Windows, but lately I've had to reinstall it a couple times (hard drive problems) and I've been wondering if I am really putting it in the best place.
I copy the eclipse folder to my C:\Program Files\ directory and make a shortcut on my start menu, and then pin it to my taskbar. However, eclipse has problems so I go to properties, the compatibility tab, and enable "Run as administrator". Then every time I open eclipse I have to hit yes on the UAC window, but everything works correctly, except for one side effect: my touchpad doesn't scroll any windows in eclipse. This is because the touchpad program is running as a normal user, so it can't modify eclipse running as administrator. So, then I have to close and reopen my touchpad software as an administrator.
Anyway, long story short... Where is the best place to put the eclipse folder in Windows, and why?
Edit: I just found a possible suggestion, feel free to comment. Sounds like I can just run it as administrator once the first time and set up all my plugins and such, and then run it as a normal user for my normal tasks (coding). I can't believe I never thought of doing this, but I may stick to the Program Files directory and give this approach a try unless I get a better answer here.
Ninite places Eclipse in C:\eclipse. Ever since asking this question, that has been my install location for Eclipse. Eclipse still does not properly handle permissions when run out of the Program Files folder.

I setup Eclipse in
c:\software\eclipse_{version}\
I keep all my open source packages (ANT, Maven, Apache, etc) in c:\software as well. Then I add the necessary directories to my $PATH variable (c:\software\ant\bin).
I also keep the Eclipse workspace under c:\software\eclipse_workspace.
The big plus behind this setup is portability. I can simply move the entire folder to a new drive, re-setup my path, and boom everything works. No interference from registry settings at all. Makes it very easy to backup.
This approached worked for XP, Windows7 RC1 and Windows7 Professional without issue.

You can install (unzip) an eclipse:
anywhere you want (meaning you don't have to install it on c:\Program Files (I install it for instance on c:\prog\java\eclipse, a directory tree I create
with a workspace set anywhere you want (for me: c:\prog\java\workspace, and I reference that workspace in my eclipse.ini.
This is important because the default location of a workspace (using user.home) is not always a good idea (see this SO question and its associated eclipse bug which will be solved only with the upcoming eclipse Helios 3.6)
with plugins set anywhere you want through a Dropins folder (also referenced in the eclipse.ini, for me: c:\prog\java\myplugins)
with a JVM installed anywhere you want (also referenced in the eclipse.ini, for me: c:\prog\java\jdks\jdk6u18, and I have installed several others jdks in c:\prog\java\jdks)
Eclipse shouldn't ever have to be in c:\Program Files, and the setting describe above works perfectly with:
Vista or Seven, UAC fully activated
XP, with no Administrator rights.

I usually install Eclipse to %LocalAppData%.
C:\Users\<username>\AppData\Local\Eclipse\<version>\
Common install path used by Google Chrome, Python, GitHub Desktop, Discord, and f.lux
Only installs Eclipse for the current user profile. (separate per-user settings)
Does not require administrator privileges
Accessible as a default Windows environment variable (%LocalAppData%)
Folder is designated specifically to hold application data

You could put it under your User folder or My Documents folder, so you don't have to worry about permissions. Then just add a link to your start menu / quick start / desktop and you will be good to go.

I have many different versions of Eclipse and related products installed. So I have them installed as C:\Eclipse\... for Windows and /Eclipse/... under Mac and Linux. Usually with the directory name as the base name of the zip - e.g. eclipse-rcp-helios-SR2-macosx-cocoa-x86_64... Some products, like those from IBM, have their own ideas and can often not be changed...
As for the workspaces - yes, I have one for each customer - they are placed under /Eclipse/Workspaces/... and friends.
And the target platforms are placed under /Eclipse/TargetPlatforms/... and friends.

Related

getting the DLLs in the application's home directory to be called upon instead of the registered DLLs

Yes, I know vb6 ancient and all that. It's still an interesting question. and the issue might not even be with vb6....
Background: We have a server running a vb6 application for our users who access this via Citrix. This installed application accesses its DLLs (also written in vb6) from a "shared folders" location.
What I want to do is have the previous version of this same app on the same server, accessing it's own set of (previous versions) DLLs. I am half way successful. the renamed app in another directory runs. But it crashes immediately upon using any feature that draws from the DLL's code.
Apparently the registered DLLs of the current version are being called upon. I dont want that. I want the DLLs found in the same directory as the renamed older app to be called upon.
Can that happen in a windows server? is this an installer's settings issue? Have you ever had this situation before? were you successful?
thanks in advance.
Harry
Post Script:
The bosses decided that experimenting with the DLLs and system settings was a waste of my time and not worth the risk. So they're throwing money at it and another server will come online for the sole reason of providing the previous version to the citrix users who want it. Thank you to all of you who pitched in with great tips and leads to other posts. (yeah I'm sort of disappointed too. Kind of wanted to know what the solution was to this.....)
The OS should be looking for the dll’s in the following places and order
The directories listed in the App Path registry key (HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp
Paths) if any
The directory where the executable module for the current process is located
The current directory
The Windows system directory
The Windows directory
The directories listed in the PATH environment variable
Given that you are using a shared folder for your dll’s, I would suppose that the app is setting the current directory to your shared folder OR is using the PATH environmental variable to specify where to look. I don’t think it is using the app path registry key path because that is version specific and you said you are using a different version.
I would suggest your try setting the path via HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp Paths

Cannot rename files from within sandbox

Do Win10 handle file permissions differently than Win7? Even when Properties > Security > Advanced permissions for files/folders seem to be identical?
Problem:
For several years, I've been running my browser within a Sandboxie sandbox. Now I migrated from Win7 to Win10, using the same Sandboxie configuration. But in Win10, the sandboxed applications have troubles in renaming files. Sandboxie does work with Win10, and no one reported the troubles I have.
For example: When I run Notepad in SB, it is unable to rename any files, not even those it just created. When I run Firefox from within SB, it does not remember its configuration from the previous run - that's because it is unable to rename .tmp files with updated configuration (e.g. "extensions.json.tmp" to "extensions.json"). Everything else seems to work fine.
Q: Do I have to set anything differently in Win10 than it was set in Win7?
Details: Without SB everything works correctly, in SB only the file rename seems not to work. The only difference I found is that without SB the apps are executed under my win accout, while in SB they are executed under the "ANONYMOUS LOGON" account. The privileges of both accounts seems to be almost identical (checked using the "Process Explorer" app).
The whole directories and everything within them is owned by me, and SYSTEM, Administrators and OWNER (myself) have full control on all files and folders, recursively.
When I create a folder, and then a file within that folder, I can rename that file even from within the sandbox. But I see no difference in privileges of this new folder/file and other folders/files created earlier (they all are owned by me, and SYSTEM, Administrators and OWNER have full control in all cases).
The same setup works in Win7Pro, but not in Win10Home. What's the problem?
Version: Win10Home x64 v10.0.18362, Sandboxie 5.30
The problem was in Sandboxie 5.30. It has been already fixed in 5.31.2.

Btrieve 6.15 (Win 95) does not autoload in VB 6.0 IDE environment

I've recently bought a new tower and used third-party software to port across all my development tools (another story in itself), including VB 6.0, all my third-party tools, and Btrieve. The only problem I have with Btrieve is more an annoyance than anything. On this new tower, I have to remember to run my compiled application once before attempting to run it from inside the IDE or else it will not load, and subsequently return a corresponding error when it attempts to open the first file.
If anyone else has encountered this and knows how to fix it, I'd much appreciate it.
After checking this page on Wikipedia I realized that I needed to focus on two files: w32mkde.exe and wbtrv32.dll
By manually running the exe file, it would load the engine and my application would then run in the IDE, but I still had to manually start the exe. The desired and original behavior on my older machine was that running my program in the IDE would automatically launch the sever exe. From the Wiki page, I learned that it was wbtrv32.dll that was actually called by the program, which in turn would call the exe if needed.
I had recentl ported over my old machine to a new tower, and many of the ocx and dll files in \windows\syswow64 did not make it. There seems to be no pattern to which ones, but I had to re-register those as I found them. There must be some link there, because when I copied-over the W*.exe and W*.dll files from my production backup folder to the syswow64 folder, it suddenly worked again. Likely just a corrupt copy of the dll file. I believe the reason that the compiled version ran correctly is because those dll and exe files were installed to the application folder, and were apparently okay, but not being invoked when run from the IDE.
Hope this might help someone else some day.

Connecting the PyDev debugger to a remote computer running a different OS

We develop software, which constantly needs to be debugged on both Linux and Windows. The way I would like to do this is to have an option in Eclipse (PyDev) saying "Debug this application on the remote Linux server". I then want the option to execute the code line-by-line.
Does such a feature exist in Eclipse? If it does not exist in Eclipse, what is the recommended approach to do such a thing? I have thought about installing Eclipse also on the Linux server, but then I have the extra work of configuring and maintaining several eclipse setups.
Have you read: http://pydev.org/manual_adv_remote_debugger.html ?
One thing you cannot escape from right now is having the sources for the debugger in the platform you want to run... (although you don't need eclipse itself there, at least you need the contents of org.python.pydev.debug/pysrc there, so, maybe you can create your script which will copy those from a 'central' location you keep updated, or if you have a shared folder, just add that network folder to your pythonpath).

MSTest run fails because source assembly is not trusted

I just added xUnit to our test project (for the Asserts, we're still using MSTest as the framework) and immediately the test runs refused to execute any of the tests. This is the error message:
Failed to queue test run '{ .... }'
Test run deployment issue: The
location of the file or directory
'...xUnit.dll' is not trusted.
It took me a few tries to find the answer in Google, so I'm putting it here in case anyone else runs into the same problem. A detailed description can be found at this blog posting.
Basically, the fix invovles right-clicking on the dll file (xunit.dll for example) in Windows Explorer, going to Properties, and clicking "Unblock" at the bottom of the tab next to the 'Security' text. It seems that Vista / Windows 2008 will automatically mark assemblies that come from other machines or the internet as unsafe.
As a couple commenters have mentioned, you may also need to restart Visual Studio for this to take effect.
In my team we had the same problem.
Your solution didn't work, but this post by Charles Sterling did help.
We used the following line:
caspol -machine -addgroup 1 -url file://\\server/share/* FullTrust -name DevShare
After having this issue and burning hours trying to get "Unblock" to stick longer than a few minutes and/or figuring out caspol to no avail, I finally found a little tidbit via Google that the assemblies will be blocked again the next time you build or rebuild the project, since they're re-copied from their original source location. (I guess I never noticed that this happened before with references assemblies, but anyway...)
My fix for this was the following:
Copy all the needed DLLs to another
spot for safe-keeping
Remove the
references in Visual Studio
Physically delete the DLLs in the
bin folder
Unblock the DLLs
individually in the spot where they
were copied off
Add the references
back in Visual Studio from the
holding spot
Every subsequent build or rebuild worked fine afterward.
Running on an XP machine (even with .NET 3.5 SP1 installed) I was not able to get any of the other solutions listed here to work.
However working from the same post by Charles Sterling that Davy Landman references, I finally succeeded with this variation:
Run the .NET 2.0 Configuration tool (Settings... Control Panel... Administrative Tools... .NET Framework 2.0 Configuration)
Click down to "My Computer ... Runtime Security Policy ... Machine ... Code Groups ... All_Code"
Create a new code group with membership condition of "Zone"="Local Intranet" and assign the permission set "FullTrust"
Restart Visual Studio
After these steps I am able to run tests, including after restarts and rebuilds.
EDIT: as described in this answer, you may need to install the .NET SDK (which is different from the .NET framework) in order to have the .NET 2.0 Configuration tool on your system.
I had the same problem with moq. But would not 'unblock'. Every time I unblocked it, it was still blocked!?!?
I had to unblock the original zip file I downloaded. Then copy the DLL from the zip file again. It work after that.
It may seem really obvious now, but when I was clicking unblock the file was set as read-only.
Only after un-checking that attribute, applying, then selecting unblock did I actually get this working.
Give that a go.
:)
PS: I also deleted all the old dll's in my bin folder, just to make sure Visual Studio wasn't picking up the old one.
I had the same problem with downloaded DLLs blocked by Vista.
You need Administrator rights to get the "Unblock" button on the file's Properties.
I simply replaced the DLLs with the latest version from source control (TFS) where I had committed them before.
Go to file
Right click and select Properties
On the first Register click on Allow
I also tried opening the file in notepad++ and renaming it.
Slightly different approach, but it worked for me. The local file system then think it comes from the same machine.
It's not just the moq.dll that needs to be unblocked. The latest zip file includes an moq.xml and moq.pdb file - referencing the dll copies these other two files to the bin folders as well. If all three have not been unblocked the tests won't run, I found.

Resources