简体   繁体   English

Android SDK 64位,Java 32位得到错误“ Java已启动但​​返回了退出代码13”。 如何运行64位Java?

[英]Android SDK 64 bit, java 32 bit getting error “Java started but returned exit code 13”. How to run 64 bit java?

I'm moving my first steps in android developement, so I got to the android developement site and followed their guide to get started. 我正在迈向android开发的第一步,因此我进入了android开发站点,并按照他们的指南开始使用。

They suggest you to install Android ADT which basically is an all-in-one solution with eclipse, sdk and everything needed. 他们建议您安装Android ADT,这基本上是一个包含eclipse,sdk和所需所有内容的多合一解决方案。

So I did, I have windows 7 home premium 64 bit I extracted the content and tried to run eclipse but I get the aforementioned error "Java started but returned exit code 13" 所以我做到了,我有Windows 7家庭高级版64位,我提取了内容并尝试运行eclipse,但是出现了上述错误“ Java启动但返回了退出代码13”

Long story short, typing in cmd "java -version" gives me this as result: 长话短说,在cmd中输入“ java -version”会给我以下结果:

C:\\Users\\User123>java -version java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b18) Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing) C:\\ Users \\ User123> java -version Java版本“ 1.8.0_25” Java SE运行时环境(内部版本1.8.0_25-b18)Java HotSpot(TM)客户端VM(内部版本25.25-b02,混合模式,共享)

From what I've read "Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)" means youre running 32bit java. 从我读过的文章中,“ Java HotSpot(TM)客户端VM(内部版本25.25-b02,混合模式,共享)”表示您正在运行32位Java。

Now, how I force eclipse to use 64 bit java? 现在,我如何强制Eclipse使用64位Java? Is already installed or is a complete different setup? 已经安装还是完整的其他设置?

But most important, why the hell java thought it was a good idea to install a 32 bit version on a 64 bit computer? 但是最重​​要的是,为什么地狱Java认为在64位计算机上安装32位版本是个好主意? It took the downloading browser settings?? 下载浏览器设置了吗? or what? 要不然是啥?

This is the log 这是日志

>!SESSION 2014-11-09 19:48:37.464 -----------------------------------------------
>eclipse.buildId=M20130204-1200
>java.version=1.8.0_25
>java.vendor=Oracle Corporation
>BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=it_IT
>Framework arguments:  -product com.android.ide.eclipse.adt.package.adtproduct
>Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product >com.android.ide.eclipse.adt.package.adtproduct
>
>!ENTRY org.eclipse.osgi 4 0 2014-11-09 19:48:42.519
>!MESSAGE Application error
>!STACK 1
>java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
>   at org.eclipse.swt.internal.Library.loadLibrary(Library.java:260)
>   at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
>   at org.eclipse.swt.internal.C.<clinit>(C.java:21)
>   at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
>   at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:653)
>   at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
>   at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
>   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
>   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>   at >org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:>110)
>   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
>   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
>   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
>   at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
>   at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Uninstall both java JDK , android SDK and installed it again 卸载java JDK和android SDK并再次安装

java JDK 64 Java JDK 64

Android SDK 32/64 Android SDK 32/64

dont forget to add java jdk to your PATH in Environment Variables 不要忘记将Java jdk添加到环境变量中的PATH中

I had to download a 64 bit version of java from filehippo.com/it/download_jre_64 ad there was no immediate and easy way to do it from hava official website unless you have a 64 bit browser, so I had to find some workaround (to download a product from its official website, wow!). 我必须从filehippo.com/it/download_jre_64广告下载64位版本的Java,除非您使用64位浏览器,否则无法从hava官方网站上直接且轻松地进行此操作,因此,我必须找到一些解决方法(从其官方网站上下载产品,哇!)。 After installing it, running "java -version" in cmd, was showing "Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)" which was just what I needed. 安装后,在cmd中运行“ java -version”,显示的是“ Java HotSpot(TM)客户端VM(内部版本25.25-b02,混合模式,共享)”,这正是我所需要的。 Now all is fine. 现在一切都很好。

Funnily, I can't still write a single line of code if I don't install another load of plugins, tools and other stuff from the SDK manager, while on the android website the android ADT package was advertised as an all-in-one solution. 有趣的是,如果我不从SDK管理器中安装其他负载的插件,工具和其他内容,那么我仍然无法编写一行代码,而在android网站上,android ADT包被广告为“全功能”一种解决方案。

Eheh... damn you programming... Should have studied engineering or something 嗯...该死的你编程...应该学过工程学或其他

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

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