I have a 32 bit .dll (sqljdbc_auth.dll) and develope on a 32 bit jdk. My System is 64 Bit. It works all the time, but now i create a runnable jar file, this file can be execute. But when i started it over a Batch File (-jar %~dp0\ScheduledPerformanceanalyse.jar) it dosent work.
Warning: Faild to load the sqljdbc_auth.dll: Cant load aIA 32-bit .dll on AMD 64bit platform.
By changing the dll to a 64 bit version it works fine, but only by the batch, by my Web-Applikation it doesen't.
My Question: How can I fix the problem without changing my jdk to a 64 bit Version?
EDIT:
I found the solution, the problem was the jre 64 bit. On the working system were both jre's installed. The batch-File used the JRE 64 not the 32 bit...
Related
I see this in the Java Control Panel
Platform: 1.8
Product: 1.80_131
Location: http://java.sun.com/product/autodl/j2se
path: c:\Program Files\java\jre1.8.0_131\javaw.exe
architecture: x86_64
The Architecture value, x86_64, suggest both 64 and 32 bit but the Java web app that I am trying to access, Oracle Discoverer, part of the Enterprise Business Suite, only works with the 64 bit Internet Explorer, suggesting to me that 32 bit Java is not installed. Is it? Or is there a problem with it?
x86 and x86_64 are both architectures; the first one is 32 bits and the second one is 64 bits. You can install as many java versions as you want side-by-side, you would just point to the one you want your application to use.
The x86_64 means it is a 64 bit architecture (see also x86-64 on Wikipedia), if it had been 32 bit, it would just have been x86 (see x86 on Wikipedia).
In any case, it is perfectly fine to install a 32 bit Java next to a 64 bit Java.
x86_64 means 64 bit java.And the path "c:\Program Files\java\jre1.8.0_131\javaw.exe" also proves that you installed 64 bit java, otherwise, the path should start with "C:\Program Files (x86)".
64 bit Internet Explorer can access both 32 bit and 64 bit java web servers.
Internet Explorer does not need to run on java environment(unless you are developing a Applet application.) which means you can run Internet Explorer without java.
Conclusion:
Your environment has installed 64 bit java, and there is no problem to you!
I know when we open an applet on 32 bit IE it requires 32 Bit JRE and vice-versa with 64 Bit.
Strange issue i noticed on my machine, is this, When i open an Applet on 64 bit IE(with 64 bit JRE) it makes an file in temp/hsperfdata_user folder but when i open same Applet on 32 bit IE(with 32 bit JRE) it not make a file in temp/hsperfdata_user folder.
I could not locate , why this happen, i stuck any help will be appreciated.
I have following version installed on my machine.
IE 11
JRE 32 bit with 1.8.0_172 version
JRE 64 bit with 1.8.0_162 version
I have been working in Java for past 8 months. Currently I am using JNA to load a third party DLL and it works fine on 32bit WinXP and 32bit Win7 machines.
On a 64bit Win7 machine, this third party dll is present under C:\Program Files(x86), I assume this means its a 32 bit DLL. So, here is the configuration I used so far,
Win7 machine - 64 bit,
Third party dll - 32 bit (as per above mentioned assumption),
JRE - tried with both 32bit and 64bit
But I get the following - "error: java.lang.UnsatisfiedLinkError: Unable to load library 'Wrapper': The specified module could not be found."
Please let me know if JNA supports loading a 32bit DLL, using a 32 bit JRE on a 64bit machine. Also, if this 32bit DLL has dependencies on other 32 & 64 bit DLLs would JNA still support it.
I am going to use procexp to find out if I am missing any dependencies. I will update this post accordingly.
Please provide your expert advise. Thanks in advance !
JNA does support loading 32 bit DLLs on a 64bit machine. But we need a 32 bit JVM to do this.
I was using Platform.is64Bit() to determine the path of the DLL. I learnt that this method returns the configuration of the JVM and not the OS.
So, in my case when I was using 32bit VM on 64bit machine, the path to the DLL was wrong.
I am trying to run a program to call C++ libraries in ImageMagick using jmagick interface (JNI) from a java program. But I am getting following exception
Exception in thread "main"
java.lang.UnsatisfiedLinkError:
C:\Program
Files\Java\jdk1.6.0_16\bin\jmagick.dll:
Can't load IA 32-bit .dll on a AMD
64-bit platform
I tried to search for jmagick.dll for 64 bit processors but couldn't find any.
Could anybody suggest any solution or show me the path if 64 bit dll is available?
Thanks,
Remove your 64 bits JDK and install a 32 bits JDK. Final users will need a 32 bits JVM.
It's about the same thing when you want to develop with Java ME on a 64 bits processor.
Resources :
JMagic mailing list - Last mail about 64 bit dll
On the same topic :
Convert 32 bit dll to 64 bit dll
I export try.jar file using 32 bit java libraries. On the client site, I have 64 bit java libraries. Can try.jar behave 64 bit executable?
For example, I have
Runtime rt = Runtime.getRuntime();
s = rt.exec("someExecutable");
the someExecutable binary is in 64 bit and using this code with 32 bit java libraries seems to be not working.
My soln' to this problem is to export try.jar using 32 bit java libraries (because my enviroment is in 32 bit) and run try.jar using 64 bit libraries in the client site.
Is this approach correct or any other suggestions?
when I run someExecutable directly (no java involved) which is 64 bit on the client site It works fine (client site is also 64 bit.).
But when I use s = rt.exec("someExecutable"); It doesnt work. the java libraries (jre executables downloaded over java.sun.com) are now 32 bit at both client and development sites.
Do my problem resolve if I install 64 bit libs to client site but not on development site??
Java librairies aren't the problem here. If you want to exec someExecutable, this program must be in 32 bits for a 32bit environment.
Java libraries aren't 32 or 64 bit, they are in Java ByteCode. So they can be executed on any JVM 64 or 32 the exact same way.
You will need a someExecutable binary available on the operating system architecture you wish to run your program on.
This isn't actually anything to do with Java - all Java is doing is going to the underlying operating system and trying to run the command in the String you pass to Runtime.exec().
What's the problem you get when do that?, if you're using 100% java code, JRE should transparents all other things.