在Windows 64位上使用32位jvm运行32位eclipse

发布于 2024-10-03 15:48:43 字数 211 浏览 3 评论 0原文

我使用的 .jar 文件之一仅适用于 Windows 上的 32 位 java 虚拟机。我安装了32位版本的eclipse和jdk,但仍然出现同样的错误。我将在运行配置中使用哪些命令来指定 32 位虚拟机来运行使用此 .jar 文件的应用程序?

-vm C:\Program Files (x86)\Java\jre6\bin\javaw.exe

不起作用。有什么想法吗?

One of the .jar files I am using only works with the 32-bit java virtual machine on windows. I installed the 32bit versions of eclipse and the jdk but it is still getting the same error. What commands would I use in the run configuration to specify 32-bit virtual machine for running the application that uses this .jar file?

-vm
C:\Program Files (x86)\Java\jre6\bin\javaw.exe

doesn't work. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

┾廆蒐ゝ 2024-10-10 15:48:43

使用 Eclipse 进行开发时,有两个 JVM 正在运行。一个运行 Eclipse 本身,另一个用于您的程序。

除非您谈论的是插件,否则您需要担心的是后者。删除 -vm 选项,以便 Eclipse 使用默认 JRE 启动。然后进入首选项-> Java->安装 JRE 并添加 32 位 Java 安装并将其设置为默认值(这就是技巧)。

如果您的应用程序使用的 JVM 发生变化,您就完成了。

如果没有,您应该从一个新的工作区开始,添加 32 位 JVM 并像以前一样创建项目。

There are TWO JVM's in action when developing with Eclipse. One running Eclipse itself, and the other one used for your program.

Unless you are talking about a plugin, it is the latter you need to worry about. Remove the -vm option so Eclipse starts with the default JRE. Then go to Preferences -> Java -> Installed JRE's and add your 32 bit Java installation and set it to be default (this is the trick).

If the JVM used by your applications change, you are done.

If not, you should start with a new workspace, add the 32-bit JVM and create your projects as before.

南渊 2024-10-10 15:48:43

看一下这个页面:

http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F

如果你在 eclipe.ini 中指定你的虚拟机,它必须在一个特殊的行中(我认为)。

您是否更改了安装的虚拟机

窗口 ->首选项-> Java->安装的 JRE

可以有 64 位 VM。

使用 -vm 参数指定启动 Eclipse 的 JRE。通过安装的虚拟机,您可以指定运行代码的虚拟机。

Take a look at this page:

http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F

If you specify your VM within the eclipe.ini it have to be in a special line (I think).

Did you change you installed VMs?

Window -> Preferences -> Java -> Installed JREs

There can be the 64bit VM.

With the -vm parameter you specify the JRE to start Eclipse. With the installed VMs you specify the VM to run you code.

故事与诗 2024-10-10 15:48:43

虚拟机有很多版本,所以我们逐一介绍:

JRE 32 位、JRE 64 位、JDK 32 位、JDK 64 位。

如果您有 64 位操作系统,您应该能够使用所有这些操作系统,这就是我在我的计算机中安装的操作系统,但是您必须遵循一个顺序,即我刚才描述的顺序,首先是 JRE 32 位,然后是 JRE 64, JDK32、JDK64。其他安装顺序可能会导致问题。以防万一,我建议您删除已安装的所有虚拟机(JavaRa 使之更容易:http://singularlabs.com/software/javara/javara-download/ ),然后按照所述顺序继续安装。

即使您有 64 位操作系统,您也想运行 32 位 Eclipse 有一些原因,其中之一是有些套件和工具不支持 64 位版本。

不要忘记设置:
JAVA_HOME: .;JDK32 PATH\bin;JDK64 PATH\bin

PATH: .;JDK32 PATH\bin;JDK64 PATH\bin

把 .; 总是好的首先是新环境变量的值

The are a lot of version of the virtual machine so let's go by all of them:

JRE 32 bit, JRE 64 bit, JDK 32 bit, JDK 64 bit.

If you have a 64 bit OS, you should be able to all of them and that's what I have installed in my machine, but there's an order you have to follow, the order I just described, first JRE 32 bit, then JRE 64, JDK32, JDK64. Other orders of installation may cause problems. Just in case, I'd recommend you to remove every virtual machine you have installed (JavaRa makes it easier: http://singularlabs.com/software/javara/javara-download/ ) and then proceed to the installation in the order described.

There are some reasons you wanna run a 32 bit Eclipse even if you have a 64 bit OS and one of them is that there are some suites and tools that do not support the 64 bit version.

Don't forget to set:
JAVA_HOME: .;JDK32 PATH\bin;JDK64 PATH\bin

PATH: .;JDK32 PATH\bin;JDK64 PATH\bin

It's always good to put the .; first in the value of your new environment variables

残花月 2024-10-10 15:48:43

用于在 Eclipse 中运行项目的 JVM 在项目的“运行配置”中定义,右键单击项目,然后选择“运行方式”,然后选择“运行配置...”。在打开的窗口中,确保在左侧菜单中选择了主类(用于启动程序的类),选择选项卡“JRE”并选择相应的 JRE(在您的情况下,是 32位版本)。单击“运行”关闭窗口以查看它是否有效。

The JVM you are using to run your project in eclipse is defined at your project's "run configuration", click right on your project then choose "Run as" then "Run configurations...". In the window that opens, make sure that your main class (the one you use to start the program) is selected in the menu on the left side, choose the Tab "JRE" and choose the according JRE (in your case, the 32 bit version). Close the window by clicking "run" to see if it worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文