必须有 Java 运行时环境 (JRE) 或 Java 开发工具包 (JDK) 才能运行 Eclipse
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20374208/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse
提问by Deepanshu
Tried googling but couldn't found the solution.
尝试谷歌搜索但找不到解决方案。
Using Windows 7 Ultimate 64 bits.
使用 Windows 7 Ultimate 64 位。
I have java(64 bits) installed here : C:\Program Files (x86)\Java\jre7
我在这里安装了 java(64 位): C:\Program Files (x86)\Java\jre7
Downloaded Android SDK from here Get the Android SDK
从这里下载 Android SDK获取 Android SDK
I downloaded the 64 bits considering my windows is 64 bits. Was 32 bits required?
考虑到我的 Windows 是 64 位,我下载了 64 位。是否需要 32 位?
Now whenever i run eclipse.exe I get the following error:
现在,每当我运行 eclipse.exe 时,都会出现以下错误:
A Java Runtime Environment or JDK must be available in order to run Eclipsec. No java virtual machine was found after searching the following location: C:\Users..\Downloads\adt-bundle-windows=x86_64-3013131030\adt-bundle-windows-x86_64-20131030\eclipse\jre\bin\java.exe
为了运行 Eclipsec,Java 运行时环境或 JDK 必须可用。搜索以下位置后没有找到java虚拟机:C:\Users..\Downloads\adt-bundle-windows=x86_64-3013131030\adt-bundle-windows-x86_64-20131030\eclipse\jre\bin\java.exe
Sorry can't post a screenshot because don't have any reputation as of now here.
抱歉,无法发布屏幕截图,因为截至目前这里还没有任何声誉。
So what should I do?
Do I need to install 32 bit Java or download 32 bit SDK ?
所以我该怎么做?
我需要安装 32 位 Java 或下载 32 位 SDK 吗?
PS: Before running Eclipse I have run "SDK Manager" and it installed some necessary tools. Maybe if this helps.
PS:在运行 Eclipse 之前,我已经运行了“SDK Manager”并安装了一些必要的工具。也许如果这有帮助。
回答by insomniac
You need to use any of the following configurations:
您需要使用以下任一配置:
x64 System, x64 JDK, x64 ADT Bundle
x64 System, x86 JDK, x86 ADT Bundle
x86 System, x86 JDK, and ADT Bundle
x64 System, x64 JDK, x64 ADT Bundle
x64 System, x86 JDK, x86 ADT Bundle
x86 System, x86 JDK, and ADT Bundle
回答by nitind
You havea 32-bit Java. "Program Files (x86)" is for 32-bit programs on a 64-bit system. Either install a 64-bit Java and use the download you have, or get the 32-bit download.
你有一个 32 位的 Java。“Program Files (x86)”适用于 64 位系统上的 32 位程序。要么安装 64 位 Java 并使用您拥有的下载,要么获取 32 位下载。
回答by MrDumb
Just Set your environment variable. Goto to Computer properties -> Advance System Setting -> Environment variables -> System Variables -> pathand after a semi colon paste the path of your JRE like this C:\Program Files\Java\jre7\binclick on ok.
只需设置您的环境变量。转到计算机属性 -> 高级系统设置 -> 环境变量 -> 系统变量 -> 路径,然后在分号后粘贴 JRE 的路径,如下所示C:\Program Files\Java\jre7\bin单击确定。
Open CMD and type java if this command works properly means your path has been set now. just open you eclipse and it will work this time. You can do this through command line too just type set PATH=C:\Program Files\Java\jre1.6.0_03\binand press enter.
如果此命令正常运行,则打开 CMD 并键入 java 表示您的路径现已设置。只需打开你的eclipse,这次它就会工作。您也可以通过命令行执行此操作,只需键入set PATH=C:\Program Files\Java\jre1.6.0_03\bin并按 Enter。
If still it is not working just paste this set PATH=C:\Program Files\Java\jre1.6.0_03\binin your eclipse.ini file :)
如果仍然不起作用,只需将此设置 PATH=C:\Program Files\Java\jre1.6.0_03\bin 粘贴到您的 eclipse.ini 文件中:)