简体   繁体   English

64位Java不起作用,32位起作用

[英]64bit Java does not work, 32bit does

I had 32 and 64bit versions of Java installed (versions 7 and 8 of both JDK and JRE [it was useless installing it twice, but installed it anyway]). 我安装 32位和64位Java版本(JDK和JRE的版本7和8 [安装两次是无用的,但无论如何都安装了它)]。

When I would exe java.exe in all of the 64bit installs (\\Program Files), it would give me something like "Java SE has stopped Working" and just wouldn't do anything. 当我在所有64位安装(\\ Program Files)中执行java.exe时,它会给我类似“ Java SE已停止工作”的提示,并且什么也不做。 Although, all of the 32bit installs would work perfectly (\\Program Files (x86)) 虽然,所有32位安装都可以正常运行(\\ Program Files(x86))

I have a 64bit install of Windows 8.1 我安装了Windows 8.1的64位

http://i.stack.imgur.com/IMPa0.png http://i.stack.imgur.com/IMPa0.png

It doesn't bother me that much, but id like to take advantage of all my RAM, and not just some of it. 它并没有给我带来太大的麻烦,但是id喜欢利用我所有的RAM,而不仅是其中的一些。

Thank you for any replies in advance. 多谢您提前回覆。

You need to have the path set correctly for the java binaries to run. 您需要正确设置路径才能运行Java二进制文件。

From JDK Installation for Microsoft Windows : 用于Microsoft Windows的JDK安装中

Updating the PATH Environment Variable

If you do not set the PATH variable, you need to specify the full path to the executable file every time you run it, such as:

C:\> "C:\Program Files\Java\jdk1.8.0\bin\javac" MyClass.java

It is useful to set the PATH variable permanently so it will persist after rebooting.

To set the PATH variable permanently, add the full path of the jdk1.8.0\bin directory to the PATH variable. Typically, this full path looks something like C:\Program Files\Java\jdk1.8.0\bin. Set the PATH variable as follows on Microsoft Windows:

    Click Start, then Control Panel, then System.    
    Click Advanced, then Environment Variables.

    Add the location of the bin folder of the JDK installation to the PATH variable in System Variables. The following is a typical value for the PATH variable:

    C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0\bin

Note:

    The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. Microsoft Windows looks for programs in the PATH directories in order, from left to right.    
    You should only have one bin directory for a JDK in the path at a time. Those following the first instance are ignored.    
    If you are not sure where to add the JDK path, append it.    
    The new path takes effect in each new command window you open after setting the PATH variable.

You need to have the classpath set correctly for javac to compile. 您需要正确设置classpath才能使javac进行编译。

See Setting the class path 请参阅设置类路径

Install JDK 32 bit version of latest java and set JAVA_HOME and PATH variables like below. 安装最新Java的JDK 32位版本,并设置JAVA_HOMEPATH变量,如下所示。

JAVA_HOME : C:\Program Files\Java\jdk1.8.0_131
PATH : C:\Program Files\nodejs\;%JAVA_HOME%\bin;C:\Program Files\TortoiseGit\bin

Hope this would be help 希望这会有所帮助

Both JRE 32-bit and 64-bit needs to be installed, then IE will detect Java Plug-in Helper as compatible. 同时需要安装32位和64位JRE,然后IE将检测到Java Plug-in Helper是兼容的。

See release notes for Java 7 Update 55: 请参阅Java 7 Update 55发行说明:

https://www.java.com/en/download/faq/release7_changes.xml https://www.java.com/cn/download/faq/release7_changes.xml

"There is a special case for 64-bit Windows - EPM (Enhanced Protected Mode)requires both 32-bit and 64-bit Plug-in installed. Please make sure you have both 32-bit and 64-bit JRE installed, otherwise there will be a warning from IE, but Java Plug-in will still run under EPM." “ 64位Windows有一个特殊情况-EPM(增强保护模式)需要同时安装32位和64位插件。请确保同时安装了32位和64位JRE,否则将是来自IE的警告,但Java插件仍将在EPM下运行。”

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

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