Host system's Java environment not available in Steam Linux Runtime
Your system information
- Steam client version (build number or date): multilib/steam 1.0.0.81-2
- Distribution (e.g. Ubuntu): EndveorOS on Zen (x11 & Wayland separately)
- Opted into Steam client beta?: Yes
- Have you checked for system updates?: Yes
- Steam Logs: steam-logs.tar.gz
- GPU: AMD
Please describe your issue in as much detail as possible:
Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist
Steps for reproducing this issue:
- Open Steam
- Open Godot
- Make a mobile project
- Make a 2D scene
- Set any installed Java directory for Android (Installed from a system repository)
- Set an Android SDK directory
- Attempt to export as an APK
- Get the error "-Invalid Java SDK path in Editor Settings.Missing 'bin' directory!"
Steps for temporarily fixing the issue:
- Run the command "steam -compat-force-slr off" to lunch Steam
- Try the previous steps
Recommended possible fixes:
- Add the "Native Linux Runtime" option to the "Steam Play compatibility tool" list as a non-default choice
- Add The "-compat-force-slr" command to Lanch Options
- Add the "Native Linux Runtime" option to the "Steam Play compatibility tool" list as a default choice for non-game software
The Steam Runtime does not include a Java runtime environment or development kit (JRE or JDK). If the Godot engine is relying for some of its optional or required functionality on the host system having a JRE or JDK with a particular layout installed separately, that's never been something that has been a guarantee.
A future Steam Client beta is likely to mitigate this by adding a new option, Properties → Compatibility → Force the use of... → Legacy Runtime, which will return to running the app/game in the non-container LD_LIBRARY_PATH-based environment that Steam has traditionally used. App/game developers will likely also be able to select the legacy (non-container) runtime as the default for individual titles.
The default for native Linux titles with no specific configuration will continue to be the Steam Linux Runtime 1.0 container (unless the -compat-force-slr off option is used, in which case the default is the legacy runtime).
The Steam Linux Runtime is going to be more stable over time than the legacy runtime, in the sense that if a title works in SLR 1.0 today, then that title is more likely to continue working in SLR 1.0 in future than anything we could achieve with the legacy LD_LIBRARY_PATH-based runtime.
The legacy runtime has the same behaviour that was the default on desktop before November 2024, so it's very easy for titles in this runtime to pick up undocumented dependencies on implementation details of the host system (such as the presence of a JRE whose layout meets the title's assumptions), either intentionally or accidentally. If a title works in the legacy runtime today, it cannot be assumed to continue working forever, because changes in the underlying system could break the title's assumptions at any time (but that was always true, and hasn't changed).
Add the "Native Linux Runtime" option to the "Steam Play compatibility tool" list as a non-default choice
We intentionally avoid saying "native" to mean "use (more of) the host system's libraries" or "don't run in a a container", because it's an ambiguous term: some people use it to mean one of those two things, but more often it means a Linux/glibc/ELF executable that can be run directly (as opposed to a Windows/PE executable that needs to be run via Wine/Proton).
Linux titles distributed through Steam are expected to use the cross-distro compatibility mechanisms that Steam provides, and Steam is unlikely to add a compatibility tool option that genuinely does not use any cross-distro compatibility layer and uses the host system's libraries as-is, because there is so little that an app/game can rely on about the host system's libraries. If what you want is a standalone executable whose developer has taken full responsibility for figuring out portability, with full access to all implementation details of the host OS, the recommendation is to download it separately and add it to Steam as a non-Steam app/game.
Java accessibility
When I saw this title, I thought for a moment that you meant this sort of accessibility. Perhaps a better title for this issue would be "host system's Java environment not available in Steam Linux Runtime".
Perhaps a better title for this issue would be "host system's Java environment not available in Steam Linux Runtime".
Agreed
If the Godot engine is relying for some of its optional or required functionality on the host system having a JRE or JDK with a particular layout installed separately, that's never been something that has been a guarantee.
Applications will end up needing dependencies outside of Steam Play. Some sort of solution for required dependencies will be needed for proper feature completion in some use cases Java or not.
As for saying it's never been a guarantee, I think it has been implied functionality by allowing Linux native build to require things like Java that aren't supplied by Steam Play as per the "Valve Corporation - Steam Distribution Agreement, section 8.2 (B)" While I don't believe this means Valve has to supply all required dependencies; This does reasonably implies system Library/dependency access.
This also isn't just Godot this is also the Linux native build of "Rise To Ruins", and likely more.
A future Steam Client beta is likely to mitigate this by adding a new option,
Properties → Compatibility → Force the use of... → Legacy Runtime, which will return to running the app/game in the non-containerLD_LIBRARY_PATH-based environment that Steam has traditionally used. App/game developers will likely also be able to select the legacy (non-container) runtime as the default for individual titles.
This Sounds like a perfectly fine fix! Though I'm not sure if the name properly describes its function. Maybe something like “System Linux Runtime", “Uncontained Linux Runtime”, “Opened Linux Runtime”, “System Supplied Linux Runtime”, "Host's Linux Runtime" or “Unstable Linux Runtime” as I think people would likely try to use "Legacy Runtime" on older applications instead of for overall usage with applications that this issue affects.
The default for native Linux titles with no specific configuration will continue to be the Steam Linux Runtime 1.0 container (unless the
-compat-force-slr offoption is used, in which case the default is the legacy runtime).
Agreed.
The Steam Linux Runtime is going to be more stable over time than the legacy runtime, in the sense that if a title works in SLR 1.0 today, then that title is more likely to continue working in SLR 1.0 in future than anything we could achieve with the legacy
LD_LIBRARY_PATH-based runtime.
This is true, but not a reason to get rid of non-container options nor is this a reason to make them inaccessible.
The legacy runtime has the same behaviour that was the default on desktop before November 2024, so it's very easy for titles in this runtime to pick up undocumented dependencies on implementation details of the host system (such as the presence of a JRE whose layout meets the title's assumptions), either intentionally or accidentally. If a title works in the legacy runtime today, it cannot be assumed to continue working forever, because changes in the underlying system could break the title's assumptions at any time (but that was always true, and hasn't changed).
This makes sense, but still isn't a reason to get rid of non-container options nor is this a reason to make them inaccessible.
We intentionally avoid saying "native" to mean "use (more of) the host system's libraries" or "don't run in a a container", because it's an ambiguous term: some people use it to mean one of those two things, but more often it means a Linux/glibc/ELF executable that can be run directly (as opposed to a Windows/PE executable that needs to be run via Wine/Proton).
That's fair, but I still think "Legacy Runtime" isn't a great name for the reasons I listed above.
Linux titles distributed through Steam are expected to use the cross-distro compatibility mechanisms that Steam provides, and Steam is unlikely to add a compatibility tool option that genuinely does not use any cross-distro compatibility layer and uses the host system's libraries as-is, because there is so little that an app/game can rely on about the host system's libraries. If what you want is a standalone executable whose developer has taken full responsibility for figuring out portability, with full access to all implementation details of the host OS, the recommendation is to download it separately and add it to Steam as a non-Steam app/game.
“Linux titles distributed through Steam are expected to use the cross-distro compatibility mechanisms that Steam provides”. This is in no way listed by the "Valve Corporation - Steam Distribution Agreement" nor was it implied until this month. This is not a reasonably communicated expectation set by Valve or Steam.
"If what you want is a standalone executable whose developer has taken full responsibility for figuring out portability, with full access to all implementation details of the host OS, the recommendation is to download it separately and add it to Steam as a Non-Steam game" If a piece of software is listed on Steam the expectation should be that if Valve breaks anything on Steam it sould be fixable with at most a few setting changes. IE: Changing what Steam Play compatibility tool you're using. A good thing to compare this to is breaking userspace; It souldn’t happen.
“There is so little that an app/game can rely on about the host system's libraries”. On Windows, Valve is fine with letting games require dependencies that need to be installed manually. So it shouldn't be a restricted or inaccessible action on Linux.
OVR is also impacted by this & the native build of BeamNG.drive has less stability & can't get into the, I be it experimental, campaign mode.
There's a chance I find how I can make a host dependent compatibility tool & make a merge request at this point.
Hi Dev of Cube Chaos here, my game is also on the list of games affected by this. To further highlight the problem, as a smaller developer it took me until now to even discover and narrow down the problem. I had steam use a bash file to execute a jar (java) file (my game). But due to the nature of the problem the bash file continous to work fine when manaully launched by the linux user and the whole linux launch option works fine on non linux systems AND steam issues are usually the last thing expected to be the problem, which in total rendered the issue hard to discover and diagnose.
@Wunarg unfortunately we have no plans to add a JRE to the steam runtime. There are not enough titles that require it, it's too large of an addition to impose on everyone so we recommend that titles that want to use java bundle the appropriate JRE with their depot at this time.
Not allowing any option for games & software to see host file is becoming really bothersome. A host Linux runtime option is needed or Valve is directly going against it's own layed out specifications for uploading games to Steam. I've already stated how valve is responsible for this not the developers. OVR, BeamNG native, this game, & Godot are all suffering from issues from entirely not working to having features that don't work. You already bake some form Java into proton so your excuse for not having some form of Java is contradictive & allowing broken games on Steam is not allowed and they only reasonable option would be that Valve is responsible. I'm making a pull request soon about a host Linux runtime option that needs to be default for certain games and software that specify it.
@Wunarg unfortunately we have no plans to add a JRE to the steam runtime. There are not enough titles that require it, it's too large of an addition to impose on everyone so we recommend that titles that want to use java bundle the appropriate JRE with their depot at this time.
I believe you misunderstand the problem, this issue isnt about having steam provide a JRE, this is merely about the files used to launch the game say a bash or any other executed file having access to the systems already pre-existing ressources in my case java, to note that accessing the systems java is still possible on Windows right now, just not when steam uses a launch option while on a linux system. To clarify: I have a launch option which works on Windows and which works on Linux when the launch option executable is manually executed by the user but DOESNT work when on Linux and exectued via the steam play button. (To me having it be harder to work on linux seems like exactly what you dont want and especially changing this behavior when as seen above many steam apps rely on it)
The problem is that your game will not run on a Linux system that does not have a suitable JRE already installed.
We would prefer that if Steam runs and doesn't report problems, then all titles will just work after that. We believe this matches the expectations of the majority of our users.
We understand that there are some older titles that were never built "right" - in a forward compatible way - and are not likely to ever get updated again. This is why we provide the "Legacy Runtime 1.0" option on a per game basis.
Currently this option needs to be set by users, for two reasons. First to make it clear that this may or may not work (as is the case for your title). The second reason is that we'd like developers to fix their packaging as much as possible, in order to provide a better experience for users moving forward.
Is there a significant obstacle for you in providing a JRE as part of your game depot for Linux? This is something we can probably help you figure out and document for developers in a similar situation.
Does your title run under Proton? This would be a good option if you don't want to engage the resources in maintaining a native release.
@TTimo
If it is expected that on Windows, for example, you have to have external dependencies for some games, why should the same not be said for Linux? It would be easier if there were a host runtime option. That way, we could have proper support. Maybe it's not accessible to everyone like the Steam Deck is, but just because a game doesn't work on Steam Deck doesn't mean it should be restricted from working on the rest of Linux.
This isn't just about Java this is about many external dependencies that are required for certain applications, this is why OVR does not work on Linux without a host runtime option.
@TTimo Never mind Legacy Runtime 1.0 allows app to access host files so I'm going to close the issue.
@Wunarg please open a separate issue if you wish to pursue a better packaging solution for your title.
Note that java is not available on Steam Deck, and configurations that require the "Legacy Runtime 1.0" will fail the Steam Deck compatibility testing.
@TTimo
We understand that there are some older titles that were never built "right" - in a forward compatible way - and are not likely to ever get updated again. This is why we provide the "Legacy Runtime 1.0" option on a per game basis.
One of the main problem I have with all of this is that it was, as far as I am aware, not communicated at all and because of that I had an unknown amount of people who tried the demo and didnt buy the game or bought the game and refunded or worse bought the game and didnt like it, because it was/is simply not working for them. Changing these requirements without announcment is not sustainable for developers, like even if I manage to adjust my linux package again how would I know it isnt changed quietly again?
Currently this option needs to be set by users, for two reasons. First to make it clear that this may or may not work (as is the case for your title). The second reason is that we'd like developers to fix their packaging as much as possible, in order to provide a better experience for users moving forward.
Currently the app doesnt function via steam at all on linux for many users (It does work with proton but its very laggy and proton doesnt appear to be the default as it shouldent be), this is absolutly massivly worse than it running and relying on a system ressource which almost all (non steamdeck) linux systems have, most users are not gonna be aware or even try to research a special compatability method they have to manually select if the game doesnt launch. If you want to incentivize me and other developers to make more self contained packaging, then a launch option we can select with something like a popup warning for the user that "This game uses the old legacy linux runtime 1.0, this means it may not work" would be much much better. Also incentivization doesnt work if the developer doesnt know what they are supposed to do or what the problem is or thinks it is a bug on steams end. In these cases they are much more likely to simply drop the linux compatabiltiy entirely or simply frustrate themselves and their users, this is mostly advice for the future but also clarification. I am in the lucky bracket of now knowing what the problem is and possibly a path to adjust to steams new linux specific specifications but this cannot be said for all or probably even most devs whose app encountered this problem. This change also makes working on linux harder and more different than on windows (where using system ressources is still possible) which makes developers further incentivised to just not bother.
Edit:
We would prefer that if Steam runs and doesn't report problems, then all titles will just work after that. We believe this matches the expectations of the majority of our users.
Right now my users have reported clicking the launch button, it going blue for a second then nothing happens and it goes back to the green play with no steam message or anything, so right now this is exactly the effect this change has had, unless I am misunderstanding.
End of Edit
Is there a significant obstacle for you in providing a JRE as part of your game depot for Linux? This is something we can probably help you figure out and document for developers in a similar situation.
This is mostly the work investment and these things are usually more difficulty than expected somehow (Example: Oracle jre costs money, open jdk is not an jre and much larger). I will go into detail in a new seperate issue since thats better for other developers though.
Does your title run under Proton? This would be a good option if you don't want to engage the resources in maintaining a native release.
It does technicly run but it has been reported as very laggy.
please open a separate issue if you wish to pursue a better packaging solution for your title.
Should I open the new issue on the steam runtime github or elsewhere?
Should I open the new issue on the steam runtime github or elsewhere?
Yes, that would be the right place.
We are very sorry if these changes caused you difficulty because of a lack of adequate documentation and communication on our end. This was initially mentioned in the Steam Client Beta update on October 17th last year (https://steamcommunity.com/groups/SteamClientBeta/announcements/detail/4507632124224426489). We will review how we can improve communication for devs shipping games on Linux moving forward.