20

I have a quick question about the difference between the 32 and 64 bit version of Eclipse. I need to know what the difference is between the actual downloads, not the differences in performance or anything like that.

My situation is this: I have set up a development environment for an Eclipse project (Java) using 64-bit Eclipse, versioned the files in Subversion, and found out after the fact that we MUST develop on a 32-bit OS because of constraints for other parts of this project. Rather than have to download and set up a whole different instance of Eclipse, is it as simple as replacing the EXEs that launch Eclipse with 32-bit versions? Or are there other files that would have to be replaced?

codewario
  • 19,553
  • 20
  • 90
  • 159
  • Don't mess with the inside of Eclipse unless you _really_ know what you are doing. Take the time to set it up again - this is a really good thing to practice anyway. – Thorbjørn Ravn Andersen Jun 13 '11 at 14:56

6 Answers6

16

Leave Eclipse running in a 64 bit JVM. Install a 32 bit JVM and configure the project to use that 32 bit JVM.

When developing a program in Eclipse, remember that there's the IDE and then there's the program being written. Eclipse has no requirements to launch the program being written in the same JVM as the IDE.

Unless you are actually developing an Eclipse-plugin, you will never know the difference. If you are developing an Eclipse-plugin, you should install a 32 bit version of Eclipse to use as your reference platform, and still develop the program using a different copy of Eclipse. Otherwise, you will run the risk of introducing dependencies based on the development environment (which might not be there in someone else's vanilla runtime).

Edwin Buck
  • 69,361
  • 7
  • 100
  • 138
  • Um, how is he supposed to run a 64-bit JVM on a 32-bit OS kernel? – SamB Jul 22 '14 at 19:38
  • @SamB Read the post again, you somehow got it backwards. I am suggesting running a 32bit Eclipse on a 64 bit OS. _It has to be 64 bit, otherwise it couldn't currently be running a 64 bit JVM_. – Edwin Buck Jul 22 '14 at 22:11
7

is it as simple as replacing the EXEs that launch Eclipse with 32-bit versions?

No. I doubt it. Eclipse relies on SWT, which is essentially native code. There will be quite a few DLLs etc. (in the plugins or features directories) that will be used by the 64-bit version, that are drastically different from the 32-bit version.

Or are there other files that would have to be replaced?

Replacement is not safe. Reinstallation is safer, and the only sane option that I can think of. I don't think you should be debugging the Equinox launcher and myriads of other components, instead of working on your project.

Vineet Reynolds
  • 76,006
  • 17
  • 150
  • 174
  • 1
    I wish I could add my personal experience here on a project that went through this; some folks attempted doing the same on a product using Eclipse RCP on a production server. But I think the DailyWTF is a better place. – Vineet Reynolds Jun 13 '11 at 14:46
6

Main difference, SWT. The core UI library used by Eclipse. You need the 64-bit version if you run on a 64-bit VM.

SWT is a native library used by Eclipse for it's UI. This makes Eclipse a mix of Java and Native code.

Andrew T Finnell
  • 13,417
  • 3
  • 33
  • 49
3

As long as you have your source code backed up, I guess it wouldn't hurt to just try swapping the exe-files. Honestly though, I strongly suggest that you reinstall with the 32-bit version. There's no easy way to pinpoint the differences of the whole application and which files you would need to replace.

aioobe
  • 413,195
  • 112
  • 811
  • 826
  • Well, my understanding is that Eclipse is all Java other than the executable used to launch it. That's all I'm trying to confirm is if this is true. – codewario Jun 13 '11 at 14:38
  • 2
    I don't think an exe swap would work. I think that theres a different SWT jar for 32 or 64 bit since it has native extensions. – alternative Jun 13 '11 at 14:38
  • 5
    @MetalSearGolid Eclipse is not all Java. It uses SWT which is a native library specifically built for each platform. – Andrew T Finnell Jun 13 '11 at 14:38
2

The SWT 32 bit jar and the SWT 64 bit jar are distinct. Swapping EXE's will not work. There may be more platform-specific jars in Eclipse. There are also more distinct differences (for example, WPF support) that you can see on the download page.

alternative
  • 12,703
  • 5
  • 41
  • 41
1

I did the opposite recently. Based on a 32 bits eclipse juno platform, I have created a 64bit initializer.

To do that:

  1. Locate the specific 64bits encapsuled plugin jar files in a 64bits packaged eclipse\plugins: org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807 (this is a folder) org.eclipse.core.filesystem.win32.x86_64_1.1.300.v20120522-1137.jar org.eclipse.core.net.win32.x86_64_1.0.100.v20120522-1148.jar org.eclipse.swt.win32.win32.x86_64_3.100.1.v4236b.jar org.eclipse.equinox.security.win32.x86_64_1.0.100.v20120522-2049.jar

  2. Put the files in the plugin folder of the eclipse you are changing

  3. Edit the file: eclipse\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info and add: org.eclipse.core.filesystem.win32.x86_64,1.1.300.v20120522-1137,plugins/org.eclipse.core.filesystem.win32.x86_64_1.1.300.v20120522-1137.jar,4,false org.eclipse.core.net.win32.x86_64,1.0.100.v20120522-1148,plugins/org.eclipse.core.net.win32.x86_64_1.0.100.v20120522-1148.jar,4,false org.eclipse.equinox.security.win32.x86_64,1.0.100.v20120522-2049,plugins/org.eclipse.equinox.security.win32.x86_64_1.0.100.v20120522-2049.jar,4,false org.eclipse.swt.win32.win32.x86_64,3.100.1.v4236b,plugins/org.eclipse.swt.win32.win32.x86_64_3.100.1.v4236b.jar,4,false (see the pattern?!: plugin-name,version,plugin-name_version.jar,4,false)

  4. Copy the eclipse.exe from the 64bits package as eclipse64.exe ( or whatever you want) in your installation;

  5. Copy your eclipse.ini as eclipse64.ini (must match the exe)
  6. Set the launcher section in the ini file replacing the original: --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
  7. Set the corresponding vm in the ini file (64bits): -vm C:/Program Files/Java/jre7/bin/javaw.exe
  8. Voilá! You have an eclipse that can work as 32 or 64 bits!

If you are doing the opposite, from 64 to 32 bits, you will have to find the plugins for 32 bits (without the 64 naming) and follow the same steps and it should work. Watch out for more platform specific plugins.