Skip to content

[BUG] Java and Python setup under Linux #300

@EtaoinWu

Description

@EtaoinWu

Describe the bug
描述一下这个 Bug
Under Linux (Fedora KDE), LemonLime is unable to execute Java code.

To Reproduce
如何复现
Steps to reproduce the behavior: 像下面这样写出重现 Bug 的步骤:

  1. Install java-21-openjdk, java-21-openjdk-devel on Fedora 43
  2. Tools - Settings - Compilers - + - jdk - accept the default options and location
  3. Judge a Java solution
  4. 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。

Image

Environment:
环境:

  • Version: 0.3.6.2
  • OS: 系统:
  • Fedora 43 x86_64, kernel 6.18.8, KDE Plasma 6.5.5

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:

Image

This seem to suggest that java is reading something (presumably in /etc) that it has no access to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    整叉劈了 | Bug有一些不该发生的东西发生了

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions