I use a VPS on Rackspace which only offers 64-bit operating systems (I'm running Ubuntu 9.04). I'm deploying Java applications to the VPS and found that the 64-bit version of the JDK uses a lot more memory than the 32-bit version.

Is there any way to run a 32-bit JVM on 64-bit (Ubuntu) Linux?


32-bit should run fine.

  • Seconded. The 32 bit JVM should just work. It certainly has for me in the past. – davey Dec 28 '09 at 15:30

If they have kept the 32bit emulation layer in their kernel (or if they use the default Ubuntu kernel), then you should be able to do that.

Probably one of the easiest ways would be to setup a chroot for your 32bit JVM. Create the chroot with debootstrap, specifying to create a i386 chroot. Install the 32bit package inside the chroot and write a script to launch the JVM inside the chroot.

You could also use ia32-libs and force installation of the i386 package, but it's a rather ugly I think.

  • Ok, I will try the chroot approach later. For now I'm using ia32-libs and using the 32-bit through that. Memory savings are about 40-50%! Cool. – user10201 Dec 28 '09 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy