简体   繁体   English

在Windows 7 64位上运行eclipse

[英]Run eclipse on windows 7 64 bit

I'm trying to run eclipse for java in Windows 7 64bit edition, and when I run the eclipse.exe file, absolutely nothing happens. 我正在尝试在Windows 7 64位版本中运行eclipse for java,当我运行eclipse.exe文件时,绝对没有任何反应。 A ephimeral javaw.exe process is created in the task manager, but as I said, it's just there for a split second, and it disappears, after that NOTHING. 在任务管理器中创建了一个ephimeral javaw.exe进程,但正如我所说,它只是瞬间存在,并且在那之后就消失了。 I tried compiling a small program with the javac.exe file, and that works all right, but for some reason I cannot run Eclipse. 我尝试使用javac.exe文件编译一个小程序,并且可以正常工作,但由于某种原因我无法运行Eclipse。

Any suggestions on what I could be doing wrong. 关于我可能做错的任何建议。 I'm a complete Java noob, it's the first time I try to do this. 我是一个完整的Java菜鸟,这是我第一次尝试这样做。

These are the files I have, and I downloaded the Windows 64bit version of eclipse. 这些是我的文件,我下载了Windows 64bit版本的eclipse。

替代文字

Thanks! 谢谢!

EDIT 编辑

OK, solved. 好的,解决了。 The book I'm using is misleading... it said I should use the javaw.exe file from jdk1.6.0_21, and doing that didn't work. 我正在使用的这本书有误导性...它说我应该使用jdk1.6.0_21中的javaw.exe文件,并且这样做不起作用。 Now I tried with one in jre6, and it ran. 现在我尝试使用jre6中的一个,它跑了。

Thanks everyone and sorry for the hassle! 谢谢大家,抱歉麻烦!

First, check you eclipse.ini (even a space at the end of a line can prevent eclipse from starting) 首先,检查你eclipse.ini (甚至一行的末尾空格可以阻止eclipse启动)

Second I am surprised to see java* file in your Eclipse distribution. 其次,我很惊讶在Eclipse发行版中看到java *文件。
You shouldn't' have those, and instead refer to the right java (64 bits) in your eclipse.ini . 你不应该拥有那些,而是在你的eclipse.ini引用正确的java(64位)。

In both case, see this eclipse.ini as a good example . 在这两种情况下,请将此eclipse.ini视为一个很好的示例

Check also the <workspace>/.metadata/.log (error log file). 还要检查<workspace>/.metadata/.log (错误日志文件)。


I just added it there because it was asking for it, supposedly the best way it to put it in the PATH. 我只是在那里添加它,因为它要求它,据说是将它放入PATH的最佳方式。

If eclipse is "asking for it", that means your current java installation is not part of the PATH . 如果eclipse是“要求它”,那意味着你当前的java安装不是PATH一部分。 It need to be reference from the eclipse.ini file. 它需要从eclipse.ini文件中引用。
See also FAQ How do I run Eclipse? 另请参阅常见问题解答如何运行Eclipse?


In any event, don't copy any java files around . 无论如何, 不要复制任何java文件
Used in your eclipse.ini a path like: 在你的eclipse.ini使用如下路径:

-vm
C:/Prog/Java/jdk1.6.0_21/jre/bin/server/jvm.dll

I faced similar problem and did not know how to proceed. 我遇到了类似的问题,不知道如何继续。

I did following things to resolve it. 我做了以下事情来解决它。

  1. In eclipse.ini enter the vm argument to which jre you want to use -vm C:\\Java\\jdk1.7\\jre\\bin\\javaw.exe 在eclipse.ini中输入要使用jre的vm参数-vm C:\\ Java \\ jdk1.7 \\ jre \\ bin \\ javaw.exe

  2. If you have -Dosgi.requiredJavaVersion=1.7 line in your eclipse make sure that version is matching the one that is mentione in step 1. ( in my case it was 1.6 and I had to change this value to 1.7) 如果您的日食中有-Dosgi.requiredJavaVersion = 1.7行,请确保该版本与步骤1中提到的版本匹配。(在我的情况下,它是1.6,我必须将此值更改为1.7)

  3. Launch eclipse.exe from the command line 从命令行启动eclipse.exe

Do you have the 64-bit version of Java? 你有64位版本的Java吗? http://www.java.com/en/download/faq/java_win64bit.xml http://www.java.com/en/download/faq/java_win64bit.xml

I experienced relatively little trouble moving to 64-bit java: 我在迁移到64位java时遇到了相对较少的麻烦:

  1. Download Eclipse Helios 64-bit version 下载Eclipse Helios 64位版本
  2. Download Java 6 SDK 64-bit version 下载Java 6 SDK 64位版本
  3. Install both 安装两个
  4. Run

The issues may arise if you have both 32-bit and 64-bit JDKs in the same machine. 如果在同一台计算机上同时具有32位和64位JDK,则可能会出现问题。 If you want to explicitly run Eclipse with one JVM, then you need to specify its full path in eclipse.ini. 如果要使用一个JVM显式运行Eclipse,则需要在eclipse.ini中指定其完整路径。

eg 例如

-vm C:/Program Files/Java/jdk1.6.0_20/bin/javaw.exe -vm C:/ Program Files / Java / jdk1.6.0_20 / bin / javaw.exe

Where the path points to the 64-bit version. 路径指向64位版本的位置。

The other issue I encountered after moving is that the Subclipse plugin by default uses a 32-bit DLL backend and therefore doesn't work. 移动后遇到的另一个问题是Subclipse插件默认使用32位DLL后端,因此不起作用。 However Subclipse also works with a pure-Java back-end for Eclipse called JavaHL which solved that issue. 但是,Subclipse也适用于Eclipse的纯Java后端,称为JavaHL,它解决了这个问题。

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

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