Is JME using 32bit or 64bit Java?

Hi,

Is JME using 32bit or 64bit Java? What if the users use 64bit Java plugin on the 64bit browser, and my JME games are implemented as applets?

Thank you.

Its using whatever is on the system. I would strongly suggest dropping applets though, not even Oracle supports them anymore and in most browsers they’re disabled by now.

2 Likes

To expand a bit on what @normen said (you probably know a good deal of this already, but I thought I’d chime in just for completeness’ sake)… Java (with the exception of Android, which is a bit different) compiles into a high level “bytecode” that does not depend on processor architecture or OS. Users install a JRE (Java Runtime Environment) on their system, which includes a JVM (Java Virtual Machine). The JVM interprets the Java bytecode and runs it as a program. (Any remotely modern desktop/server JVM will contain a JIT compiler that compiles bytecode on the fly into native machine code which runs much faster than interpreted bytecode, but this is an under-the-hood detail that you can totally ignore.) In short: Java programs (and usually, Java developers) never know or care whether the program is running on a 32 or 64-bit machine. The JVM takes care of all of that for you under the hood. However, this gets complicated when Java code (like jME) needs to use native libraries to access things like OpenGL and joystick input. In that case, things get can get pretty nasty pretty fast. The good news for JME users is that the JME devs already took care of all of that. JME bundles the 32-bit and 64-bit builds of the native libraries that it needs with itself, so you never need to even pay attention to any of that.

Also, as @normen said, applets are dead. Save yourself a lot of headaches (and future rewrites of your code) and don’t try to use them. Use Java WebStart instead: https://docs.oracle.com/javase/tutorial/deployment/webstart/

Webstart is also dead. C/C++/C# don’t have applets or webstart and don’t suffer for it. So why do java people beat this dead horse. Deploy java like any other application. With a proper first class (aka native) installer for each target.

As for the original question. Yes there is 32bit support for most of the native libs and you can generally use either or. But don’t expect it to be around forever. Basically unless you have a real good reason. Use 64bit.

I wouldn’t go so far as to say that WebStart is dead. Unlike applets, the software is still in place to use it even if in practice it’s rarely used. That being said, I can’t think of a single good experience I’ve had as an end user of a WebStart application. Just about every time I’d go to run one I’d have to go tinkering around with browser file associations and/or security settings because apparently nobody ever actually signs their WebStart jars with valid certificates. Fun times. At any rate, I 100% agree with you about native installers being the way to go (or at the very least a standalone zip with an executable jar), especially for games.

2 Likes

Thank you everyone.