32 bit JDK on 64 bit Weblogic Server - weblogic

Is it possible to run an application on a 64 bit Weblogic 10.3.2 Server instance with a 32 bit JDK?
The reason for me to doing this is getting an exceptions while running my program using 64 bit JDK.
UCFWin32JNI.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
The error is gone when using 32 bit JDK.
If it is possible, then how?
Thanks!

A 32-bit version of a library cannot be loaded and used by a 64-bit JVM, and vice versa.
Moreover, UCFWin32JNI.dll does not appear to be a WebLogic library at all. In fact, it appears to be a library from Documentum. You ought to be looking for a 64-bit version of that library (if it is available) as it appears to be a 32-bit version going by the name and the error message produced. Finally, you'll need to place the 64-bit version in one of the directories constituting java.library.path.

No problems at all running a 32bit JVM on a 64bit platform. In fact, for some applications it can actually be more efficient, due to the fact that certain data types are innately larger on a 64bit JVM (ints I think are an example of this from memory)
A 64bit JVM provides all sorts of advantages for an application requiring access to a larger heap, but there's no harm at all in running a 32bit JVM.

Related

How IEDriver bit is determined for the execution

We have 2 machines in which we run IE selenium Test scripts. In both the machine IE 32 bit is configured. In one machine it types faster and in another machine it types each word. So in that machine i changed the IEDriver bit version as 64 and it worked as expected.
My question is, how the IE driver bit is determined as 64 or 32. Is there any relation between OS bit version ?? like if OS is 64 IE should also be 64 ?
There are technical reasons why the “bitness” of the driver must match that of the browser, mostly stemming from the fact that the driver uses Windows hook procedures for processing keystrokes by default. Those technical reasons are outlined in a blog post written by the driver author (me) some years ago. The tricky bit is knowing whether the browser is actually 32-bit or 64-bit.
You see, IE uses multiple processes when browsing, notably a broker process (which handles the outer frame of the browser), and content processes (usually one per tab, which actually renders the content). Starting with IE10, though, the challenge is that those processes (the broker and the content processes) can have different bitnesses. In fact, on 64-bit Windows, this is the default, where the broker process is 64-bit, and the content processes are 32-bit. Element interactions like sending keystrokes happen in the content process, so that’s what the driver must match.
That means the most common case is that one should use the 32-bit IE driver, even on 64-bit Windows. It must be pointed out that there are some cases where one can get a 64-bit content process (usually based on Enhanced Protected Mode), but these are a vast minority of cases.
If you use IEDriverServer.exe 32-bit execution will be faster and if you use 64-bit execution will be slower irrespective of your OS. So, use 32-bit as its faster. I have tried with both 32 and 64-bit, trust me 64-bit is way too slow.
From https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#internet-explorer-driver:
The driver supports running 32-bit and 64-bit versions of the browser.
The choice of how to determine which "bit-ness" to use in launching
the browser depends on which version of the IEDriverServer.exe is
launched. If the 32-bit version of IEDriverServer.exe is launched, the
32-bit version of IE will be launched. Similarly, if the 64-bit
version of IEDriverServer.exe is launched, the 64-bit version of IE
will be launched.
AFAIK, you can run either the 32 or 64-bit driver on 64-bit Windows; I'd expect that you can only run the 32-bit driver on 32-bit Windows.
Anecdotally, the 32-bit driver is considered "faster" than its 64-bit counterpart. But--given that perceived speed is influenced by the system-under-tests's CPU/RAM--that would need to be benchmarked to be certain. That being said, I have previously used the 32-bit version on 64-bit systems because it did appear faster (especially WRT to text entry).

Error when running a 32 bit .dll on a 64 bit JVM Inteliij

I am getting the below error when I try to execute the below line of code in my project. I added a 64 bit JDK to my project properties . I am using Intellij as my IDE
System.loadibrary(smsjavaagentapi)
Fatal Error: Exception from System.loadibrary(smsjavaagentapi) java.lang.unsatisfiedLinkError smsjavaagentapi.dll: Can't load IA 32 bit .dll on an AMD 64-bit platform
I think the problem is that I am using a 64 bit JVM and I am trying to run a 32 bit .dll. I don't have an option to install 32 bit JDK on my machine and add it to my project properties nor I can port the .dll to 64 bit . Is there a work around for this?
There is a limitation at the OS level which prevents a 32-bit shared library being loaded by a 64 bit process, so your options are
modify the OS to allow this (not easy)
migrate the DLL to 64-bit by recompiling it.
install a 32-bit JVM (easier)
download a 32-bit JVM and unpack it without install it. (doesn't require any special permission)
You might find you can get a version of IntelliJ which ships with a 32-bit JVM, or install another program which installs a 32-bit JVM and use just the JVM.

Apart from "bitness", are .dll files specific to machine/processor type in some way?

I am working on the development of a Java application that loads native library files to perform some calculations. The application uses JNI to load the libraries. This application should work on Windows and Linux environments (on both 32-bit and 64-bit).
During the compilation process, we compile C code to library files (32-bit and 64-bit dlls for Windows, and 32-bit and 64-bit .so files for Linux environments). These .dlls and .so files are included in the distribution file, and are referenced when Java is called by using the -Djava.library.path parameter.
I am now testing the application on a few different machines. I am initially focused on 64-bit Windows environments. The strange thing that I have encountered is that on some 64-bit machines the application loads the correct .dll files successfully, but on some other machines it does not load the .dlls.
I thought that the problem might because of a difference in the processor type between the machines (ie. that the dlls were compiled for one processor type and other processors types cannot use them).
However, it works on one machine, and does not work on another machine that has the SAME processor:
It works on a HP laptop running Windows 7 64-bit, with this processor:
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 37 Stepping 5, GenuineIntel
It does not work on a Lenovo laptop running Window 7 64-bit, with this processor:
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
My question is: apart from the bitness are .dlls machine/processor type specific in some other way? (I know that the .dll files have to match the bitness of the machine, and that the JVM must also match the bitness of the .dll files)
Or in theory, if a .dll is 64-bit should it run on EVERY 64-bit machine that is using a 64-bit JVM?
apart from the bitness are .dlls machine/processor type specific in some other way?
Very much so. Any compiled binary meant to run under an operating system is both processor and operating system specific, sometimes even down to specific versions of each.
Different processors - even in the same family, such as "x86" - can offer different instruction sets and capabilities. See https://en.wikipedia.org/wiki/X86_instruction_listings for the listing of different variations of just x86 instruction sets and capabilities. If a compiled binary uses a specific instruction, it won't run on a processor that doesn't implement that instruction. For example, if a binary is compiled to use SSE3 instructions, it won't run on processors that don't implement SSE3.
And it's not just limited to hardware, either. Operating system specifics matter, too, literally for starters because the operating system is what starts the running process. So the binary needs to work under the conditions and in the environment of the operating system that started it. A binary designed to work under an operating system will also need to make calls to that operating system to interact with data, devices, or other processes. Different operating systems provide these capabilities in vastly different ways, even to the point of different versions of the same basic operating system doing so in incompatible ways.
And binaries that aren't designed to run under an operating system have to provide very hardware-specific capabilities - ever notice how many device drivers any operating system has? And this excludes any shared object or DLL because by definition they are already designed to run under an operating system.
Or in theory, if a .dll is 64-bit should it run on EVERY 64-bit
machine that is using a 64-bit JVM?
It should be clear by now that the answer is "Not even close".

This java instance does not support a 64-bit JVM

I home host a Minecraft server and I just updated Java to update 65, the server worked perfectly before updating but now, it says
"This Java instance does not support a 64-bit JVM. Please install the desired version."
Installing 32-bit Java doesn't help and this also happens when I run my Minecraft client.
I have 64-bit Windows 7 running 64-bit Java 7.
If anybody can help that would be great.
EDIT: Fixed it, apparently I'm just an idiot and had 32-bit installed when I updated java, and since I thought I had 64-bit installed I never thought to re-install it. Sorry for wasting your time
As the author stated, the solution was pretty simple. Bringing it to an answer to help future users
This java instance does not support a 64-bit JVM
This error is associated with your System looking for a Java 64-bit Virtual Machine and not finding any.
To solve it, you must make sure that the 64-bit Java is installed. The problem the OP had was: He assumed he had the 64-bit installed, but he did not.
To download Java, access Java Website
Because you are using 64 bit minecraft client, you are not able to work even with 32 bit JVM.
Kindly install all the things, mincraft server,client, JVM of 32 bit only. You can run it definitely. If still not able to work, let me know with exact error message you are getting.

Forcing 64 bit jvm to 32 bit jvm?

Would anyone please give me ideas about forcing 64 bit jvm to run as 32-bit jvm?
I need to write a jse desktop application for bluetooth connection. For that i need to implement Bluecove jar . It has 32-bit files only. So i included -D32 under VM arguments in eclipse pulsar. But still i am getting the same error that displayed before adding the argument: bluecove_x64.dll missing. I tried with -d32, and it showed me "unrecognized option: d32".
And it seems like i should install a 32-bit jvm that would run on 64-bit os. So, can anyone please tell me what exactly should i install? Java SDK in 32-bit or Eclipse software?
Thanks in advance!
Switching modes is only possible on Solaris. A JVM is either 64bit or 32bit, except on Solaris where both run modes are available in a single JVM.
But anyway, if you don't need more than 4Gig Ram, install the 32bit JVM also on 64bit Systems, because it is 10-15% faster and needs less memory.
First, install a 32-bit JVM. (I suppose this is under Windows).
Then in Eclipse, open the Preferences panel, and go to Java -> Installed JRE's.
Click Search, tell it to search your harddisk.
Wait.
You should now see both your original 64-bit JVM and your new 32-bit JVM in the list. Put the checkmark on the 32-bit JVM instead of the 64-bit JVM. Click OK.
You should now use a 32-bit JVM in Eclipse, which should be compatible with the library you have.