Describe the bug
描述一下这个 Bug
Under Linux (Fedora KDE), LemonLime is unable to execute Java code.
To Reproduce
如何复现
Steps to reproduce the behavior: 像下面这样写出重现 Bug 的步骤:
- Install
java-21-openjdk, java-21-openjdk-devel on Fedora 43
- Tools - Settings - Compilers -
+ - jdk - accept the default options and location
- Judge a Java solution
- See a runtime error:
bash: line 1: /usr/bin/java: Not such file or directory
Expected behavior
期望获得的结果
Java code should be executed normally
Screenshots
有截图吗?
If applicable, add screenshots to help explain your problem. 如果可以的话,附上屏幕截图来帮助表现 bug。
Environment:
环境:
Additional context
其他信息
Add any other context about the problem here. 如果,你还有想说的话……
My hypothesis: LemonLime uses bubblewrap to run the code. In the console that runs LemonLime, I see
QList("--dev", "/dev", "--proc", "/proc", "--ro-bind", "/usr", "/usr", "--symlink", "/usr/lib", "/lib", "--symlink", "/usr/lib64", "/lib64", "--symlink", "/usr/bin", "/bin", "--symlink", "/usr/sbin", "/sbin", "--tmpfs", "/tmp", "--unshare-all", "--die-with-parent", "--chdir", "/tmp/Lemonlime-jvfwqF/_0.0/", "--bind", "/tmp/Lemonlime-[redacted]/_0.0/", "/tmp/Lemonlime-[redacted]/_0.0/", "/tmp/Lemonlime-[redacted]/_0.0/[redacted]", "/usr/bin/java", "-Xmx1024m ball", "", "_tmpout", "_tmperr", "2000", "-1", "1000", "512", "ball.in", "")
when a run was attempted. On my system:
⮞ file /usr/bin/java
/usr/bin/java: symbolic link to /etc/alternatives/java
⮞ file /etc/alternatives/java
/etc/alternatives/java: symbolic link to /usr/lib/jvm/java-21-openjdk/bin/java
And the above bubblewarp seem to suggest that /etc is not readable. When I set the interpreter to the actual binary /usr/lib/jvm/java-21-openjdk/bin/java, the not found error disappeard, and was replaced by another:
This seem to suggest that java is reading something (presumably in /etc) that it has no access to.
Describe the bug
描述一下这个 Bug
Under Linux (Fedora KDE), LemonLime is unable to execute Java code.
To Reproduce
如何复现
Steps to reproduce the behavior: 像下面这样写出重现 Bug 的步骤:
java-21-openjdk,java-21-openjdk-develon Fedora 43+-jdk- accept the default options and locationbash: line 1: /usr/bin/java: Not such file or directoryExpected behavior
期望获得的结果
Java code should be executed normally
Screenshots
有截图吗?
If applicable, add screenshots to help explain your problem. 如果可以的话,附上屏幕截图来帮助表现 bug。
Environment:
环境:
Additional context
其他信息
Add any other context about the problem here. 如果,你还有想说的话……
My hypothesis: LemonLime uses bubblewrap to run the code. In the console that runs LemonLime, I see
when a run was attempted. On my system:
And the above bubblewarp seem to suggest that
/etcis not readable. When I set the interpreter to the actual binary/usr/lib/jvm/java-21-openjdk/bin/java, thenot founderror disappeard, and was replaced by another:This seem to suggest that
javais reading something (presumably in/etc) that it has no access to.