问题
I am trying to create a SWT WindowBuilder application in 64-bit Eclipse running on Windows 7.
I removed both the 32-bit and 64-bit JRE on my computer along with the old Eclipse and old JDK, rebooted, downloaded the latest version yesterday evening, and then installed the latest 32/64 versions of the JRE and the JDK. Yes, I used a "professional" unzip utility, 7-zip, to unzip the "Eclipse IDE for Java Developers" and then copied the contents to the "C:\Program Files\Development\Tools\Eclipse", which I created.
I launched Eclipse this morning and tried to create a SWT application and SWT was MIA.
I went to the "Menu > Help > Install New Software..." dialog to find that SWT was already installed.
Here is an image of of the new project dialog "Menu > File > New > Other".
As you can see Eclipse came bundled with SWT, I did read the installation note about the fact that only Eclipse does not support the Windows built-in zip compression tool, and used 7-zip.
How do I get SWT to install properly? I am using a freshly downloaded version and did not do anything other than go into Eclipse.
Why would SWT not show?
回答1:
I figured out this problem and another one.
Installation Instructions
Download 'Eclipse IDE for Java Developers', not the EE version.
Extract the files using WinZip, 7-Zip, or whatever, just not Windows built-in tool. See installation notes on Eclipse download page for this requirement.
DO NOT place files in the "C:\Program Files" folder on Windows 7. See here for note.
BEFORE starting eclipse.exe, go to the environment settings and define the HOME variable and set that to %USERPROFILE%. You will need to log out and then log back in. Windows will not read the environment settings without doing this set and as such Eclipse.
Install PortableGit-1.8.4-preview20130916 and add the path in the PATH variable.
Start Eclipse.
Go to "Menu > Help > Install New Software..." and type in kepler. Select the SWT and WindowBuilder from the list. It was supposed to come prebundled, but did not, better this way. You will need to restart Eclipse.
Turn on the error log, "Menu > Windows > Show View > Error Log" to see any other errors that might exist.
I am still working on the EGit warning, but SWT exists.
I tried these steps repeatedly (deleting Eclipse folder and trying again) and the steps worked each of the times that I tried it. Yay!
来源:https://stackoverflow.com/questions/22099190/how-to-get-window-builders-swt-designer-in-64-bit-eclipse