JAVA_HOME can support x86 and x64 both together? - java

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.

Related

flashdevelop built error: Can't initialize jni4net. (32bit vs 64bit JVM vs CLR ?)

I'd reinstalled Windows on my PC, after that flashdevelop started to throw errors while building. Application starts for a few seconds, but then closes.
output:
Error details: net.sf.jni4net.jni.JNIException: Can't initialize jni4net. (32bit vs 64bit JVM vs CLR ?)
CLR architecture: 64bit
JAVA_HOME: C:\Program Files (x86)\Java\jre6 ---> System.BadImageFormatException: . (Exception from HRESULT: 0x8007000B)
in net.sf.jni4net.jni.JNI.Dll.JNI_GetDefaultJavaVMInitArgs(JavaVMInitArgs* args)
in net.sf.jni4net.jni.JNI.Init()
in net.sf.jni4net.jni.JNI.Init()
in net.sf.jni4net.jni.JNI.CreateJavaVM(JavaVM& jvm, JNIEnv& env, Boolean attachIfExists, String[] options)
in net.sf.jni4net.Bridge.CreateJVM()
in FlashDebugger.DebuggerManager.Start(Boolean alwaysStart)
I've installed as I think all nessesary soft & sdks. Flex+Air, java 1.7 32bit, flashplayer.
But nothing helps. More than that, when flashdevelop is opening there are some errors with plugins.
Searching didn't help. I found nothing about this problem.
Need help (
Because your JVM and CLR architecture is not match, Your CLR architecture is 64bit however your java architecture is 32bit, to solve the problem, you need to install 64bit Java
1) If your system is running 64bit OS then you must install 64bit version of java
2) If your system is running 64bit OS and you have installed 32bit version of java then you can use the following tool to change CorFlags value of "proxygen.exe" application.
Command to change CorFlags: "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\Corflags.exe" proxygen.exe /32BIT+ /force
Ref: https://learn.microsoft.com/en-us/dotnet/framework/tools/corflags-exe-corflags-conversion-tool

which java version to install Windows x86,Windows x64 so that it will run on both 32 bit and 64 bit

when i go to download page of the java there are two version for java
Windows x86
Windows x64
How to find out which version is suitable for installation ?
If your OS is windows 32 bit then download Windows x86 version. If your OS is windows 64 bit then download Windows x64 version.
Java is platform independent. If you use platform independent libraries when developing; Your app will run on both 32 and 64 bit.
I have figured out a way to to check which architecture is your system through command prompt
wmic os get osarchitecture
Run this on your command prompt and you will get
"32-bit" or "64-bit".
and download the respective exe.

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.

What is appropriate Java Platform in Windows XP?

I created Software Project in java Netbeans 8 and running on JDK 8.My Operating System is 64 bit.And My client Machine running on Windows xp 32 bit operating system.Would it work in xp if i made exe ?
What is appropriate Java Platform in Windows XP?
None really. Read this: https://www.java.com/en/download/faq/winxp.xml which explains why Oracle no longer supports Java on Windows XP.
Now you can probably find older versions of Java that will run on Windows XP, but you won't be able to get (reliable) security patches any more, either for the OS or for Java.
Would it work in xp if i made exe ?
It probably wouldn't. For a start, many of the ways to turn Java code into an exe do it by embedding a JRE inside the exe!
Do yourself a favour and upgrade to a PC with a more up-to-date Windows operating system. Or install Linux on it ... for free.
You can still install the Java 8 version in windows XP. When you generate the exe file, try to generate with 32bits.
You can do it with Launch4j for example.

JDK x64 and JRE x86 application open

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.

Categories

Resources