How can I force 32 bit jdk on 64 bit os?

I want to run my java programs on 32 bit jdk, how can I force a 32 bit sun jdk on opensuse 11.3 64 bit?

I think I have to install those packages :
java-1_6_0-sun-1.6.0.u20-1.2.i586
java-1_6_0-sun-devel-1.6.0.u20-1.2.i586

but looks like zypper is not willing to do that

$> sudo zypper in java-1_6_0-sun-1.6.0.u20-1.2.i586 java-1_6_0-sun-devel-1.6.0.u20-1.2.i586
Loading repository data…
Reading installed packages…
Resolving package dependencies…

Problem: java-1_6_0-sun-devel-1.6.0.u20-1.2.x86_64 requires jre-1.6.0-sun-64 = 1.6.0.u20-1.2, but this requirement cannot be provided
uninstallable providers: java-1_6_0-sun-1.6.0.u20-1.2.x86_64[repo-non-oss]
Solution 1: Following actions will be done:
do not install java-1_6_0-sun-1.6.0.u20-1.2.i586
do not install java-1_6_0-sun-jdbc-1.6.0.u20-1.2.i586
do not install java-1_6_0-sun-plugin-1.6.0.u20-1.2.i586
do not install java-1_6_0-sun-src-1.6.0.u20-1.2.i586
Solution 2: do not install java-1_6_0-sun-devel-1.6.0.u20-1.2.x86_64
Solution 3: break java-1_6_0-sun-devel by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/3/c] (c): c

Why for heavens sake are you trying to do this?
Totally unnecessary …

I noticed that Intellij idea work much better on a 32 bit jdk.

Basically just get the 32 bit version from Sun, the bin file not the rpm.

Make bin file executable, and run it as root. Follow install instructions, making sure you place it in a different directory then the current version.

Once installed you can use the JAVA_HOME environment variable to point to the one you want to use as a default. However if using Netbeans or Eclipse, you can easily set which version you want the IDE to use by default, as well as on a per project basis.

Note to the person who asked you would want to do this, one good reason is if working with ME the emulator currently only runs on 32 bit java.

Choose Solution 2.

Solution 2: do not install java-1_6_0-sun-devel-1.6.0.u20-1.2.x86_64

If you’re installing x86 you don’t need x86_64.

Take Care,

Ian

Thanks for the replies, I installed the sun 32 bit as suggested here and it works fine, i actually left the 64 bit that installed by zypper and installed sun jdk aside it.