Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal. You can also buy games using our partner links for GOG and Humble Store.
How to get a 32bit JVM running on a 64bit Linux OS via Steam Client?
Page: 1/2»
  Go to:
noblemaster Apr 21, 2016
Hi guys! I was told to post here where all the Linux experts hang out :)

In any case here is the problem: I have released my game on Steam. Steam provides 32bit .so libraries to connect to the Steam API. The game is written in Java. In order to use the 32bit .so library (I don't think there is a 64 bit one?), I need to run the game via a 32bit JVM. So far so good.

As it turns out, the 32bit JVM surprisingly runs on the 64bit Steam OS (Intel Brix). However, the same application does not run via "regular" Steam (not the Steam OS), if the Linux operating system is 64bit and throws the following error:

java.lang.ClassNotFoundException: com.ageofconquest.app.user.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:59)
at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)


What needs to be done to get the 32bit JVM to work on a regular 64bit Linux installation? What does the Steam OS do different that it works there? Are there some additional libraries that are installed for compatibility?
Daverball Apr 21, 2016
There's definitely 64bit versions of the Steam API too, so a 64bit JVM should definitely work as well I don't think your error is related to whether you run the game on a 32bit or 64bit JVM though, seems more like there might be some files missing on your game's install.
abelthorne Apr 21, 2016
Same JVM on both systems or different ones (i.e. OpenJDK vs Sun Java, or OpenJDK 7 vs OpenJDK 8)?

SteamOS is based on Debian, is the regular Steam you've tried on a Debian too (if possible same version than the SteamOS basis) or a different distro?
Cheogh Apr 21, 2016
I was having some problems getting Minecraft and Project Zomboid running awhile ago after a fresh install of Archlinux. I needed to install xorg-xrandr. No clue if this is the problem you are having.
wojtek88 Apr 21, 2016
Let me start with this sentence - Never wrote a piece of code that communicates to Steam API.
But I will try to provide you some ideas.
Steam OS may come with different classpath set (through environment variable for example) or you're just comparing 2 setups with different classpaths (one of them may have classpath set, other don't).

In general - ClassNotFoundException = you do not have on a classpath a jar that contains class that you want access.
And according to stack trace it looks like Steam code cannot find your class, not the other way around (OK, maybe not Steam code, but the code that tries to install the game).

I would say one should be true - either classpath issue or like @abelthorne suggested - you're using different JVMs (maybe they have different Classloader behaviour?).
noblemaster Apr 22, 2016
Thanks for the reply guys!

xorg-xrandr: that might do the trick! I forwarded the information. :-D

The game is using Oracle Java 32bit. I find it odd too to get a "ClassNotFoundException". I'd assume there to be another error if the binaries are not able to run on 64bit? However, that same 32bit Oracle JVM works on 64bit Steam OS, just not anywhere else. Doesn't work via regular Steam client, just the Steam OS.

Also, I got 64bit binaries (not for Steam) which work fine! Unfortunately, in order to integrate with Steam, I need to use the 32bit JVM. Somehow I think this should work with the right compatibility libraries installed! Maybe xorg-xrandr might do the trick?

EDIT: re-classpath: the JVM is bundled & the classpath is fixed (relative to the working directory). I cannot see what would change by running it on 64bit Linux? I think the error might not be correct, but then I might be wrong?
abelthorne Apr 22, 2016
It would be pretty surprising that xorg-xrandr (or whatever similar package) is related, as Xrandr is only a tool to get/set the screen information, like resolution and such.

What do you mean by "that same 32bit Oracle JVM works on 64bit Steam OS, just not anywhere else"? How have you tested it on both OS?
noblemaster Apr 22, 2016
I have tested it personally on 64bit Steam OS & it works. I don't have any other Linux installations.

I was given the stacktrace that is produced on the clients Linux computer while running the game via Steam. It's possible the 32bit JVM is working for other people on Linux 64bit via Steam. Sorry, I don't have that information.
wojtek88 Apr 22, 2016
If there is a way to provide me temporary key (is Steam able to do such a thing? I know that there is a "Free weekend" concept, but I don't know if temporary key is possible at all) I should be able to do some tests for you during the weekend in some free time on my setup.
noblemaster Apr 23, 2016
The game is free, but I can send you some additional promo codes! Download it from here:
http://store.steampowered.com/app/314970

Then email me at contact at ageofconquest.com and mention this thread! - Thanks for testing :-D
abelthorne Apr 23, 2016
Quoting: noblemasterI have tested it personally on 64bit Steam OS & it works. I don't have any other Linux installations.

I was given the stacktrace that is produced on the clients Linux computer while running the game via Steam. It's possible the 32bit JVM is working for other people on Linux 64bit via Steam. Sorry, I don't have that information.
So, it's SteamOS on your machine and a Linux distro with the Steam client on your customer's side, is that it?

In that case, you should ask him/her a few details about the system, like the JVM used (update-alternatives --config java will list the JVM installed and allow to choose one if there's multiple choices − it has to be run as superuser, i.e. through sudo on distros that have it), the distro and version used.

Also, is your customer running Steam through a terminal to get the output given in your first post or simply the game without Steam (the behaviour would not be the same due to the Steam runtime)?

On your side, you can try to boot a different distro as live version, like Ubuntu, if your game is not too graphic intensive (as you won't be able to install eventual proprietary GPU drivers). You'll have to install Steam and maybe Java on it but it's in RAM, you don't install anything on your HD and don't mess with your current setup. That might allow you to check if you can reproduce the issue outside of SteamOS.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.