JDK x64 and JRE x86 application open - java

If I have JDK x64 installed and I make application, can I run it with JRE x86, or it just compiles application to be x64? Also can I run eclipse x64 with JDK x86, or eclipse x86 with JDK x64?

Java bytecode is platform-independent. Java code compiled with a 64-bit JDK works on a 32-bit JRE and vice versa - there is no difference in the bytecode.
You do not need to compile your Java code for 32-bit or 64-bit.

You don't need to download and install JDK and JRE together, JDK installation package has it's own JRE installation inside. So you need to install JDK only so things won't get messy talking compatibility wise.

Related

Install JRE (but not JDK) via brew on macOS

How do I install only JRE (not JDK) using homebrew on macOS?
If you want to install Java 11, there is no separate JRE anymore. See How to use jdk without jre in Java 11

JAVA_HOME can support x86 and x64 both together?

My OS is win7 x64, and java.com recommend that using java x86 version in your OS x64 or you can install x86 and x64 both in your OS, but the path of Java_Home (JDK or JRE) can using the x86 and x64 at the same time?
sorry for the page is Chinese...
https://www.java.com/zh_TW/download/faq/java_win64bit.xml
Your path can include as many versions as you like however only the first version in your PATH will be the one chosen. This is how a PATH work. On all operating systems. This is how the class path also works.
I recommend using the x64 where ever possible on an x64 operating system because unless you have 32-bit DLLs, or running Java in a 32-bit browser, you are better off using the x64 version.

How do I upgrade from JavaVM 32bit to JavaVM64bit

I have a 64bit operating system with phpStorm 9.0.2 installed.
I get out of memory errors and it seems like JVM32bit might not help the cause.
How can I upgrade my JVM32bit version to JVM64bit?
Is it just as simple as downloading a 64bit version and installing it or are there any other extra steps to take to do this correctly?
OS Win 7 64bit
You can run PhpStorm even if you have no Java installed on your computer as on Windows it comes bundled with own 32-bit JRE which will be used by default ignoring your system-wide Java (if you have one).
That's why "uninstall 32-bit Java and just install 64-bit one instead" is not enough (as in some cases you simply have no system-wide Java installed on your computer).
Download and install 64-bit JDK (yes, it has to be JDK and not just JRE)
Create IDEA_JDK_64 environment variable and point it to JDK root folder. For example:
Use 64-bit PhpStorm's executable (PhpStorm64.exe) instead of 32-bit (PhpStorm.exe).
The above works just fine for me.
If anything -- please refer to official support article.

Java 8 and browser plugin

I installed JDK 8, when I type in cmd java -version I get 1.8, the browser when run my applet which needs Java 1.8, it says the JRE 1.8 is not available, run this using the latest JDK.
When I check the plugin in browser all point to JRE 7, Chrome and IE. In Java Control Panel I see JDK 8 listed.
I think the likely explanation is that you've installed a 64bit JRE/JDK, but you still have 32bit browsers.
So the browsers just aren't seeing and are unable to use the 64bit plugin.
I had the same issue, and I installed the x86 JDK as well, and subsequently the Java plugin is listed.

Do I need both JRE 1.6 and JRE 1.7?

I have both JRE 1.6 and JRE/JDK 1.7 installed on my PC. Do I need both JREs, or can I just keep JRE 1.7 and uninstall JRE 1.6?
I only occasionally have anything to do with the JDK so I'm largely unfamiliar with the Java world. Mostly I just need the JRE for the misc application that needs it.
I do know from PHP web development experience that I need both PHP 5.1 and 5.3 due to deprecation versus enhancement issues, so I was not sure if JRE 1.6 and 1.7 were similar.
Please advise.
Unless you have something that specifically depends on JRE 1.6, you can just keep 1.7.
In general, the Java language is very backwards compatible, so such dependencies on older versions are rare.
There is one special concern with the 6-to-7 leap, though: Oracle changed the licensing model for Java distribution, so you must be aware that OpenJDK 1.7 and Oracle Java 1.7 are not quite the same. So if you have Oracle JDK 1.6, you can't necessarily replace it with OpenJDK 1.7 -- you might have software that depends on the proprietary Oracle-only packages.
JRE 7 should be backward compatible with 6. Since you said JRE, and not JDK, I'd say you're safe to remove JRE 6.
if you have JRE 1.7 then I think you don't need the JRE 1.6. you will get all the features of JRE 1.6 in JRE 1.7
If you have JRE 7u45, you may have issue while reading system properties from JNLP files, in this case better to use java 6

Categories

Resources