简体   繁体   English

如何安装JRE或JDK以在Windows 7上运行Android Developer Tools?

[英]How do I install a JRE or JDK to run the Android Developer Tools on Windows 7?

I'm trying to install the Android Developer Tools on my Windows 7 computer, so that I can use the Android emulator to test websites. 我正在尝试在我的Windows 7计算机上安装Android开发者工具,以便我可以使用Android模拟器来测试网站。

Android Developer's website, " Setting Up the ADT Bundle ": Android Developer的网站“ 设置ADT捆绑包 ”:

The ADT Bundle provides everything you need to start developing apps... If you haven't already, go download the Android ADT Bundle. ADT Bundle提供了开始开发应用程序所需的一切......如果您还没有,请下载Android ADT Bundle。

... ...

Install the SDK and Eclipse IDE 安装SDK和Eclipse IDE

Unpack the ZIP file (named adt-bundle-.zip) and save it to an appropriate location, such as a "Development" directory in your home directory. 解压缩ZIP文件(名为adt-bundle-.zip)并将其保存到适当的位置,例如主目录中的“开发”目录。 Open the adt-bundle-/eclipse/ directory and launch eclipse. 打开adt-bundle- / eclipse /目录并启动eclipse。 That's it! 而已! The IDE is already loaded with the Android Developer Tools plugin and the SDK is ready to go. IDE已经加载了Android Developer Tools插件,SDK已准备就绪。

My computer, after I carried out those exact steps: 在我执行了这些确切的步骤后,我的电脑:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. 必须提供Java运行时环境(JRE)或Java Development Kit(JDK)才能运行Eclipse。 No Java virtual machine was found after searching the following locations: 搜索以下位置后未找到Java虚拟机:
C:\\Development\\adt-bundle-windows-x86_64-20130219\\eclipse\\jre\\bin\\javaw.exe C:\\开发\\ ADT-束 - 窗口x86_64-20130219 \\日食\\ JRE \\ BIN \\ javaw.exe的
javaw.exe in your current PATH 当前PATH中的javaw.exe

How do I get a Java Runtime Environment or Java Development Kit that will let me run the Android Developer Tools bundle? 如何获得允许我运行Android Developer Tools捆绑包的Java Runtime Environment或Java Development Kit?

(And, for bonus points, why isn't it included in the download, if the download is meant to provide "everything you need to start developing apps"?) (并且,对于奖励积分,为什么不包含在下载中,如果下载是为了提供“开始开发应用程序所需的一切”?)

You can go here to download the Java JRE. 您可以到这里下载Java JRE。

You can go here to download the Java JDK. 您可以到这里下载Java JDK。

After that you need to set up your environmental variables in Windows: 之后,您需要在Windows中设置环境变量:

  1. Right-click My Computer 右键单击“ 我的电脑”
  2. Click Properties 单击属性
  3. Go to Advanced System Settings 转到高级系统设置
  4. Click on the Advanced tab 单击“ 高级”选项卡
  5. Click on Environment Variables 单击Environment Variables

EDIT: See screenshot for environmental variables 编辑:查看环境变量的屏幕截图

在此输入图像描述

下载jre1.7.0_45,然后将其解压缩到Eclipse文件夹中,并将jre1.7.0_45的文件夹重命名为jre,Eclipse将运行

你需要从这里下载并安装jdk

If using win7 64 bit OS: 如果使用win7 64位操作系统:

After installing the latest JDK make sure you copy the jre folder from the install location { C:\\Program Files\\Java\\jdk1.7.0_40 } directly to your eclipse folder as even pathing it apparently does nothing on win7. 安装最新的JDK之后,请确保将jre文件夹从安装位置{ C:\\Program Files\\Java\\jdk1.7.0_40 }直接复制到您的eclipse文件夹,因为即使路径显然它在win7上也没有任何作用。

Mad

edit: 编辑:

Actual jdk version number on folder name will vary as newer versions are released 文件夹名称上的实际jdk版本号将随着更新版本的发布而变化

Your problem is that you have 64-bit eclipse running but you have 32 bit JRE .So please download JRE for 64 bit windows and let it install on the default location. 你的问题是你运行了64位eclipse但你有32位JRE 。所以请下载64位windows JRE并让它安装在默认位置。 Finally add that path till bin in your PATH variable. 最后在PATH变量中添加该路径直到bin。 Try it should work. 尝试它应该工作。

Eclipse: failed to create the java virtual machine – message box Eclipse:无法创建java虚拟机 - 消息框

  1. Open folder with Eclipse.exe and find eclipse.ini file 使用Eclipse.exe打开文件夹并找到eclipse.ini文件
  2. Replace -vmargs by your current real path of javaw.exe with 用您当前的javaw.exe实际路径替换-vmargs

     -vm "c:\\Program Files\\Java\\jdk1.7.0_07\\bin\\javaw.exe" 

    or in case you've installed jre only: 或者如果你只安装了jre:

     -vm "C:\\Program Files\\Java\\jre7\\bin\\javaw.exe" 

The most likely reason why the Java Runtime Environment JRE or Java Development Kit JDK is that it's owned by Oracle not Google and they would need a redistribution agreement which if you know there is some history between the two companies. Java运行时环境JRE或Java开发工具包JDK的最可能原因是它由Oracle而不是Google拥有,他们需要再分配协议,如果您知道两家公司之间存在一些历史记录。

Lucky for us that Sun Microsystems before it was bought by Oracle open sourced Java and MySQL a win for us little guys.... Thank you Sun! 幸运的是,Sun微系统公司之前被甲骨文开源的Java和MySQL买下了我们小家伙的胜利....谢谢Sun!

Google should probably have a caveat saying you may also need JRE OR JDK 谷歌应该有一个警告说你可能也需要JRE或JDK

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

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