1

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.

enter image description here

Here is an image of of the new project dialog "Menu > File > New > Other".

enter image description here

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?

Konstantin Komissarchik
  • 28,879
  • 6
  • 61
  • 61
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
  • I see you have posted 4 questions about 64bit Eclipse. Can you explain what the difference between the questions is, because I guess most people won't read them all. If some of the questions are resolved, either delete them (if there is no answer) or post an answer on your own. If they are all more or less the same, please delete the others and *edit* your questions rather than posting new ones. – Baz Feb 28 '14 at 17:03
  • I got trained by DevExpress, not to mention here on StackOverflow, that I should keep problems separate and be succinct. One project or problem might have many sub-problems. The overall problem is the same, I want to create a 64-bit version of my SWT application that has a single JAR file, which I can run, which with the exception of the SWT.jar file, will be platform independent. (continued next comment) – Sarah Weinberger Feb 28 '14 at 17:13
  • I tried, and failed, to have my 32-bit Eclipse create a 64-bit version of my application. I dug into the problem and another thread (linked to previously) here on StackOverflow indicated that I have to be clean. A 64-bit Eclipse creates a 64-bit application and a 32-bit Eclipse creates a 32-bit application. Okay, that was a bit annoying, but that makes sense and learning how to install and set up Eclipse is good for my learning, so tally-ho. I then set out on the project to install a 64-bit Eclipse. That simple activity has been anything but simple. That is separate from my main problem. – Sarah Weinberger Feb 28 '14 at 17:16
  • I am trying to be as helpful to the community and future developers as possible by giving screenshots and showing exactly what I did. If I ran into the problem, then others will. Creating one ticket with multiple sub-issues gets too complicated and non-understandable. I am trying to be succinct and straight to the point. Here in this ticket, I want to install a 64-bit Eclipse and create a SWT WindowBuilder Application Window, nothing more. That I do not see SWT is another story. The issue with the folder select not working is another story as well and not related to SWT. – Sarah Weinberger Feb 28 '14 at 17:19
  • Ok, fair enough. To your question at hand: You need to add SWT to your class path manually: If you go to the plugins subfolder of your eclipse folder, you can see the SWT jar file starting with `org.eclipse.swt.platform.X.X.X.jar`. You can either use that one or download the one for windows 64bit from [here](http://download.eclipse.org/eclipse/downloads/drops4/R-4.3-201306052000/#SWT). Then simply add it to your class path and that's it. – Baz Feb 28 '14 at 17:45
  • Baz, I see the file in the plugins subfolder, but that does not help me to create a new SWT application, as Eclipse does not enumerate SWT in the list of project types, as I show in the screenshot above. – Sarah Weinberger Feb 28 '14 at 21:36
  • I see what you are saying, but that is not an answer. Your solution is that I do manually what Eclipse would have done had the SWT project options been there. That is a work around and not an explanation to why the problem exists in the first place or how to fix the problem such that Eclipse enumerates SWT in the list of project types. Basically, where does Eclipse get the information for the project types that it shows? – Sarah Weinberger Feb 28 '14 at 21:40
  • How do I remove a plugin? Simply removing the two SWT jars from the plugins subfolder with Eclipse64 closed does not work. That causes a rip. I had to replace those two SWT jars to get Eclipse64 to load. – Sarah Weinberger Feb 28 '14 at 21:47
  • Well, of course. You can't simply delete files and still expect the program to work. Have you tried [this](http://www.vogella.com/tutorials/EclipseWindowBuilder/article.html#swtdesigner)? – Baz Feb 28 '14 at 22:21
  • Baz, I think that I might have found the answer. I have to log out and download the right Eclipse this time. Just now I accidentally downloaded the 'Eclipse IDE for Java EE Developers'. I found two links, one went bye-bye and the other is StackOverflow question 20593137. Basically, Eclipse cannot be installed at "C:\Program Files" on Windows 7. Additionally, Eclipse must have the HOME variable defined as %USERPROFILE% and PortableGit-1.8.4-preview20130916 must be in the path. Doing all that worked, although on the EE SWT had to be downloaded. Stay tuned. – Sarah Weinberger Feb 28 '14 at 22:53
  • Sorry for elongated discussion, almost at answer. The other article is http://www.eclipse.org/forums/index.php/t/326451/. – Sarah Weinberger Feb 28 '14 at 22:55

2 Answers2

1

I figured out this problem and another one.

Installation Instructions

  1. Download 'Eclipse IDE for Java Developers', not the EE version.

  2. 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.

  3. DO NOT place files in the "C:\Program Files" folder on Windows 7. See here for note.

  4. 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.

  5. Install PortableGit-1.8.4-preview20130916 and add the path in the PATH variable.

  6. Start Eclipse.

  7. 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.

  8. 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!

Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
  • Just a note: I have eclipse installed under `c:\program files` on windows 7 without any problems. – Baz Mar 01 '14 at 07:48
  • No comment. The evidence on my side still remains as does the comments by others. Basically, Eclipse has bugs. Whether Eclipse works or not using Windows Unzip and in "C:\Program Files" may depend on other software or something. Finding out what would require the developers of the software to debug on a system like mine, where it does not work and find out what specifically fails. Even this way, there are still incompatibilities between versions of Eclipse. – Sarah Weinberger Mar 01 '14 at 14:31
0

select install new software there will be download.eclispse.org/releases/(Your eclipse version) Select SWT Designer SWT Designer Documentation SWT Designer Core