Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

32-bit should run fine.

share|improve this answer
    
Seconded. The 32 bit JVM should just work. It certainly has for me in the past. –  davey Dec 28 '09 at 15:30
add comment

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.