I have a Windows 2008 64-bit server and I have to install a 32-bit JRE, because my Java application uses 32-bit DLLs using JNI.
Unfortunately the java.exe is installed to C:\Windows\SysWow64 and when I start a console window or a batch file the installed java.exeis not found. (Because cmd.exe is a 64-bit application and sees the 64-bit version of the system directory which has no java.exe)
How can I make the installed java.exe available to batch files and the command line without to much messing around with the system configuration, causing other problems or preventing future updates to the JRE?
Don't rely on the java.exe that's in a Windows system directory; add the bin directory of your Java runtime environment to the PATH environment variable (if that's not too much "messing around with the system configuration").
Known issues when you install a 32 -bit JRE on a 64- bit Windows architecture machine:
Online Installation and Java Update features are not applicable to 64-bit architecture
The public JRE installed with the 32-bit JRE is not registered. You must set the PATH environment variable to point to JAVA_HOME \bin to register the JRE
http://www.oracle.com/technetwork/java/javase/install-windows-64-142952.html
Related
I want to activate IIS on Windows Server 2012 via InstallShield setup. I tried the following DISM command:
DISM.EXE /enable-feature /online /featureName:IIS-WebServerRole /featureName:IIS-WebServer
Described here: Installing IIS 8.5 on Windows Server 2012 R2
When I execute my Setup, an error occurs:
The Process Monitor says, that DISM will be executed in C:\Windows\SysWOW64\DISM.EXE and results in Exit Status 11. As File Location I used [SystemFolder]. When I define File Location C:\Windows\System32 it also uses C:\Windows\SysWOW64\DISM.EXE.
What is a tough way to activate IIS?
Per this post, error code 11 indicates that the 32-bit version of DISM is being used on a 64-bit system. This corresponds with installing a 32-bit MSI on a 64-bit system and using it to locate and launch DISM. Windows Installer does not allow you to refer to 64-bit locations from a 32-bit MSI. Heath Stewart's article Different Packages are Required for Different Processor Architectures touches on this, but mostly from the angle of installing to 32- or 64-bit locations. As it turns out, finding files there is just as hard.
In order to launch a 64-bit DISM from a 64-bit location, you will need some other code. It may be possible to locate the 64-bit system folder from 32-bit code, but I know some 64-bit locations can only be correctly queried by 64-bit code. As such I would suggest you write a 64-bit helper exe to find and launch the 64-bit DISM. Then you will need two variants of your custom action so that you only try to use the 64-bit wrapper on a 64-bit system (when VersionNT64 is defined) and use a 32-bit wrapper or direct call on a 32-bit system.
Alternately, if upgrading and using an exe is an option, InstallShield 2013 and later include support for installing Windows Features as part of the Suite project type, which will thus handle this work for you. (Disclaimer: I am paid to work on InstallShield.)
I downloaded the 32-bit eclipse for my 32-bit fedora 12. I extracted the tar.gz without any error. But when i click on the eclipse executable, i am getting the error:
"Failed to load the JNI shared library "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so"
"
I am not able to resolve this error. Please inform how to proceed.
Regards,
Go to your eclipse folder
Open eclipse.ini file and check if there is -vm option set properly
Else set -vm in one line followed by your jdk installed bin folder.
Hope this helps yo solve your problem.
I'd suggest avoiding OpenJDK, as Eclipse will keep complaining about it.
So, navigate to http://java.com/en/download/manual.jsp and download appropriate Sun's Java package (32 or 64 bit, depending on your current installation). As Fedora uses RPMs for package management, I advise to use that method.
Then, after installation, run java -version in terminal, you should get something like:
$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
I have JDK 7(64bit) Netbeans 7.2 and OpenCV 2.4. I already set the
path variable by adding the relavant OpenCV paths. But the program
stile give the that error when executing.
I already run my program on 32bit environment with JDK7(32bit) Netbeans 7.2 and OpenCV 2.4; In that case the programe execute perfectly.
Can any one help me to figure out the problem when i use 64bit environment
Install JDK7 (64 bit).
Copy the OpenCV directory to your windows (C) drive.
Install microsoft c++ 2010 redistributable x64.
Make "C:\opencv\build\common\tbb" as yor path in environment variables.
Download javacv-0.1.jar and make this as your library file in your project.
If the problem exist download cv100.dll, cvcam100.dll,cxcore100.dll,opencv_highgui220.dll from internet and copy this to system32.
I am writing a launcher in C++ to launch my java based GUI application on Windows. I am using CreateProcess to launch "javaw.exe". Everything works except for the fact that 32-bit version of "javaw.exe" is always launched.
When java is installed, it puts the executables "java.exe" and "javaw.exe" in %windir%\System32 on 32-bit windows. On 64-bit windows, it puts the same executables in %windir%\SysWow64.
There are 3 possibilities:
32-bit launcher executed on 32-bit windows: %windir%\System32 is in search path, and 32-bit javaw.exe is found. The GUI launches. Everything works.
32-bit launcher executed on 64-bit windows: %windir%\System32 is in search path. %windir%\System32 is redirected to %windir%\SysWow64 (since my launcher is 32 bit in this case). 32-bit javaw.exe is found. The GUI launches. Everything works.
64-bit launcher executed on 64-bit windows: %windir%\System32 is in search path. No redirection happens. It does not contain the executable javaw.exe. The launcher fails.
How do I launch 64-bit javaw.exe in the third case?
I finally found a solution (by digging through various posts on stackoverflow).
Recent versions of JRE when installed do put a copy of "javaw.exe" in System32. The previous versions of 64 bit JRE probably didn't (not sure).
In any case, the registry key HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Runtime Environment has a property CurrentVersion which points to the key for the default JRE for the system. The sub-key corresponding to the version number has a property JavaHome which points to the location of JRE installation.
If JRE/JDK is not installed, then the Java Runtime Environment key won't be found.
I try to uninstall Java ME SDK from Windows 7 x64, but it doesn't work for me.
If I choose Uninstall I get a progress bar, then it goes away, but the Software is still there.
On the first few times I did this, I got the same error message as in I need help UNINSTALLING Java ME SDK:
... show message dialog
title: Critical Error
message: Cannot load native library from path: native/jmesdk/windows/windows-x86.dll
Exception:
java.lang.UnsatisfiedLinkError:
C:\Users\Jonas\AppData\Local\Temp\nbi-8367277139934329064.tmp: Can't load IA 32-bit .dll on a AMD 64-bit platform
In ref to getting the uninstaller to use the 32-bit JRE, the config I attempted that failed to work:
a) Set the PATH environmental variable to point to the 32-bit JRE
b) Windows registry edits in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6 to point to the 32-bit JRE.
In a last ditch effort I renamed \Program Files\Java to Java2, and the uninstaller must have searched to find \Program Files (x86)\Java, the 32-bit JRE, and the uninstall worked.
Seriously, Sun/Oracle. Test your products.
I had the exact same problem and I figured it out. :)
It's because you have the 64-bit JRE installed. Either uninstall it or somehow redirect the J2ME uninstaller to use the 32-bit JRE on your system, so that the 32-bit uninstaller can run instead of the 64-bit uninstaller.
I had the same problem and figured the solution out. As mentioned above you need to make sure J2ME unnistaller only recognizes Java x86. The simplest way I found, instead of unnistalling Java x64, you only have to temporarily rename your Java x64 installation folder to anything you want. That is, rename the folder C:\Program Files\Java to, e.g, C:\Program Files\JavaTEMP.
Now run unnistaller. When finished rename the folder back it's previous name.
That's all.
Hope I helped.
Just perform the following steps and you will be done:
1) Click on the link below and click on any of the ...i586.exe link according to your system
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
2)Install the software without changing default settings.
3)Run cmd command and type the following:
C:\Java_ME_platform_SDK_3.0\uninstall.exe --javahome "C:\Program Files (x86)\Java\jre8"
4)[optional] uninstall java 8 from control panel which you downloaded to uninstall the above software.
Congratulations.. You just did it!!
Thank you for reading.. Any suggestions or aprreciation is welcomed..
Turns out I had exactly the same problem, uninstall java (TM) 7 64bit and locate the 32-bit java installer bone this download uninstall it and try to install the Sun Java Wireless Toolkit and uninstalled correctly.
Just run this command:
C:\Java_ME_platform_SDK_3.0\uninstall.exe --javahome "32-bit jre location"
Rather than temporarily moving the x64 JRE out of the way, just tell the J2ME SDK uninstaller to use the 32bit JRE:
C:\Java_ME_platform_SDK_3.0\uninstall.exe --javahome "C:\Program Files (x86)\Java\jre7"
Note that this provides the path to a JRE within the "Program Files (x86)" directory, which is the 32bit variant. I only had a Java 7 JRE, but this ought to work with a Java 6 JRE, also.