简体   繁体   English

32位和64位Eclipse之间的区别

[英]Difference between 32 and 64 bit Eclipse

I have a quick question about the difference between the 32 and 64 bit version of Eclipse. 我有一个关于32位和64位版本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. 我的情况是这样的:我已经使用64位Eclipse为Eclipse项目(Java)建立了一个开发环境,在Subversion中对文件进行了版本化,并且由于受到限制我们必须在32位操作系统上开发对于该项目的其他部分。 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? 而不是必须下载和设置一个完整的不同Eclipse实例,它是否就像用32位版本替换启动Eclipse的EXE一样简单? Or are there other files that would have to be replaced? 或者是否有其他文件需要更换?

Leave Eclipse running in a 64 bit JVM. 让Eclipse在64位JVM中运行。 Install a 32 bit JVM and configure the project to use that 32 bit JVM. 安装32位JVM并配置项目以使用该32位JVM。

When developing a program in Eclipse, remember that there's the IDE and then there's the program being written. 在Eclipse中开发程序时,请记住有IDE,然后是正在编写的程序。 Eclipse has no requirements to launch the program being written in the same JVM as the IDE. Eclipse没有要求启动与IDE在同一JVM中编写的程序。

Unless you are actually developing an Eclipse-plugin, you will never know the difference. 除非您实际开发Eclipse插件,否则您永远不会知道其中的区别。 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. 如果您正在开发Eclipse插件,则应安装32位版本的Eclipse作为参考平台,并且仍然使用不同的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). 否则,您将面临基于开发环境引入依赖关系的风险(可能不会出现在其他人的vanilla运行时中)。

is it as simple as replacing the EXEs that launch Eclipse with 32-bit versions? 是否像使用32位版本替换启动Eclipse的EXE一样简单?

No. I doubt it. 不,我对此表示怀疑。 Eclipse relies on SWT, which is essentially native code. Eclipse依赖于SWT,它本质上是本机代码。 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. 64位版本将使用相当多的DLL等(在插件或功能目录中),这与32位版本完全不同。

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. 我不认为你应该调试Equinox启动器和无数其他组件,而不是在你的项目上工作。

Main difference, SWT. 主要区别,SWT。 The core UI library used by Eclipse. Eclipse使用的核心UI库。 You need the 64-bit version if you run on a 64-bit VM. 如果在64位VM上运行,则需要64位版本。

SWT is a native library used by Eclipse for it's UI. SWT是Eclipse用于UI的本机库。 This makes Eclipse a mix of Java and Native code. 这使Eclipse成为Java和Native代码的混合体。

As long as you have your source code backed up, I guess it wouldn't hurt to just try swapping the exe-files. 只要您备份了源代码,我想只需尝试交换exe文件就不会有什么坏处。 Honestly though, I strongly suggest that you reinstall with the 32-bit version. 老实说,我强烈建议您重新安装32位版本。 There's no easy way to pinpoint the differences of the whole application and which files you would need to replace. 没有简单的方法来确定整个应用程序的差异以及需要替换的文件。

The SWT 32 bit jar and the SWT 64 bit jar are distinct. SWT 32位jar和SWT 64位jar是不同的。 Swapping EXE's will not work. 交换EXE不起作用。 There may be more platform-specific jars in Eclipse. Eclipse中可能有更多特定于平台的jar。 There are also more distinct differences (for example, WPF support) that you can see on the download page . 您还可以在下载页面上看到更明显的差异(例如,WPF支持)。

I did the opposite recently. 我最近做了相反的事。 Based on a 32 bits eclipse juno platform, I have created a 64bit initializer. 基于32位eclipse juno平台,我创建了一个64位初始化器。

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 在64位打包的eclipse \\ plugins中找到特定的64位封装插件jar文件:org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807(这是一个文件夹)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 将文件放在您正在更改的eclipse的plugin文件夹中

  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) 编辑文件:eclipse \\ configuration \\ org.eclipse.equinox.simpleconfigurator \\ bundles.info并添加: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(见模式?!: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; 将eclipse.exe从64位软件包中复制为安装中的eclipse64.exe(或任何你想要的);

  5. Copy your eclipse.ini as eclipse64.ini (must match the exe) 将eclipse.ini复制为eclipse64.ini(必须与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 在ini文件中设置启动器部分替换原始文件: - 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 在ini文件(64位)中设置相应的vm:-vm C:/ Program Files / Java / jre7 / bin / javaw.exe
  8. Voilá! 瞧! You have an eclipse that can work as 32 or 64 bits! 你有一个可以作为32位或64位的日食!

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. 如果你正在做相反的事情,从64位到32位,你将不得不找到32位的插件(没有64位命名),并按照相同的步骤,它应该工作。 Watch out for more platform specific plugins. 注意更多特定于平台的插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM