Executing jar without system java (JRE) on linux
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 領域
- cli, operating-systems
調査の方向性
まず、issue に記載されている bash launcher と linuxJdk/bin のレイアウトを確認し、Cube Chaos.jar がどのように呼び出されるかも確認します。Linux 上で Steam の起動とアセットパスの動作を再現し、そのうえで、ゲームのアセットパスを維持し、予期しない Steam の動作を説明できるバンドル Java での起動を完了条件として定義します。
索引モデルが issue の本文から書いたものです。
説明
This issue is about a public attempt of transitioning my game on linux to have a bundled java version since systems java is no longer accessable.
Its public to possibly help people at steam to provide better assistance, it may also be usefull as an example. This is mostly due to @TTimo offering/asking about this.
Previous method:
There was a .sh (bash) file
-this bash file checked the systems java version via:
version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F '.' '{sub("^$", "0", $2); print $1$2}')
-this translated the version into a 2 digit number to then compare it and check if the java version is high enough
-the jar file is then executed via:
java -jar Cube\ Chaos.jar "$@" (the "$@" apparently
-this is a simple jar file produced by a Java IDE (in my case Eclipse) which is the game itself
This is no longer functional because steam launches the bash file without access to the systems java.
Disclaimer:
I have close to no experience with bash scripts, most of this is snippeted together.
Also I am releasing an update on the first of the next month so I may be a little slow to respond or do work on this.
I can only test on linux very slowly due to the virual machine beeing very slow and finicky, as such I have asked one of the people of the community for help, though this is obviouly still messy.
Attempt:
-This whole attempt is on a seperate devtest branch to make sure normal use is not impacted
-I have downloaded the newest linux openjdk jdk (oracle is not free to distribute) and added it to the folder which is the package
-I have modified the bash to be:
#!/bin/bash
cd ./linuxJdk/bin
java -jar ../../Cube\ Chaos.jar
read
-the read command is just there to keep the terminal open for the purpose of testing
-I have attempted it without the cd going into the java bin subfolder but without that the java command does not work, even if changed to /linuxJdk/bin/java -jar Cube\ Chaos.jar to include the path there.
-This does launch the file in some way however this approach has 2 problems so far:
--Presumably due to beeing opened from a different path the game cannot find its own assets, I have no idea how to possibly be in the java path as well as in the main game path, but likely am just missing some bash knowledge. Could also be some other problem who knows.
--For some reason when the bash is executed manually steam automaticly tries to launch as well and adds its log to the bash terminal, this is quite perplexing considering the previous bash file did not do this. I am currently using https://github.com/code-disaster/steamworks4j to connect to steam with the game for stuff like friends list info and achievements, however this shouldent launch steam nor has it in the past. Additionally the game is made to work fine even without steam. This is not strictly required to fix but would make the game more susceptible to future problems.
Questions:
-Is there a common way to launch jar games via steam which doesnt require this messy bash workaround?
-Any ideas on how to resolve the bash folder issue?
-Any idea why manually executing the bash also launches steam?
- 主要言語
- Shell
- スター
- 1.5k
- フォーク
- 98
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ValveSoftware/steam-runtime のほかの issue
-
Need Retest Pressure Vessel
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ValveSoftware/steam-runtime#854 · コメント 4 件 ·
-
Need Retest
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
ValveSoftware/steam-runtime#853 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
ValveSoftware/steam-runtime#851 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
ValveSoftware/steam-runtime#847 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
ValveSoftware/steam-runtime#845 · コメント 4 件 ·
ValveSoftware/steam-runtime の issue をすべて見る
似ている issue
-
admission-deferred priority: medium status: ready work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melodic-software/claude-code-plugins#10887 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
allows image
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DaoCloud/public-image-mirror#46272 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kubernetes-csi/csi-driver-iscsi#485 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
Euro-Office/DocumentServer#485 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信