Skip to content

Conversation

@jmontleon
Copy link
Member

I realize the goal is to get rid of this script, so no issue if we don't want to bother merging this. But the first arg for execvp is supposed to be the command itself.

Signed-off-by: Jason Montleon <[email protected]>
@jmontleon
Copy link
Member Author

Instead of

user         878     876  1 12:49 ?        00:00:15 java-external-provider --port 14651 --port=50094
user         979     878  6 12:50 ?        00:01:32 -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dosgi.checkConfiguration=true -Dosgi.sharedConfiguration.area=/jdtls/config_linux -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true -Xms1g -XX:MaxRAMPercentage=70.0 --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -jar /jdtls/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar -data  -Djava.net.useSystemProxies=true -configuration ./

It now shows:

user        5254    5252  6 14:27 ?        00:00:11 java-external-provider --port 14651 --port=50496
user        5366    5254 21 14:27 ?        00:00:29 /usr/lib/jvm/java-17-openjdk-17.0.13.0.11-4.el9.x86_64/bin/java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dosgi.checkConfiguration=true -Dosgi.sharedConfiguration.area=/jdtls/config_linux -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true -Xms1g -XX:MaxRAMPercentage=70.0 --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -jar /jdtls/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar -data  -Djava.net.useSystemProxies=true -configuration ./

Copy link
Member

@aufi aufi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks OK, just linking PR with jdtls startup change replcing this script functionality konveyor/analyzer-lsp#749

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

This pull request has been automatically marked as stale because it has not had any activity for 60 days.
It will remain open for visibility and reporting purposes.
Please comment if this PR is still relevant.

@github-actions github-actions bot added the stale label Nov 4, 2025
@tsanders-rh
Copy link
Contributor

Script Usage Analysis

I investigated whether this PR is still relevant given that analyzer-lsp#749 replaced the jdtls.py script with Go code in the java-external-provider.

Findings

While the java-external-provider no longer uses this script, the script is still actively used by other Konveyor projects:

  1. konveyor/kai - Starts the container with default CMD to keep it running while copying files:

    docker run -d --name=bundle quay.io/konveyor/jdtls-server-base:latest
    docker cp bundle:/jdtls ./example/analysis
  2. konveyor/kantra - Lists jdtls-server-base as a supported Java provider in hybrid mode documentation

  3. analyzer-lsp Makefile - Uses the script for temporary containers:

    podman run --name temp-jdtls -d quay.io/konveyor/jdtls-server-base:latest

The container's default CMD ["/jdtls/bin/jdtls"] (Dockerfile:60) calls the upstream shell script, which imports and executes this Python script.

The Bug

The bug is real. Python's os.execvp() expects args[0] to be the command name by convention. Current code:

exec_args = ["-Declipse.application=...", ...]  # Missing java_executable
os.execvp(java_executable, exec_args)  # ❌ Violates convention

This PR correctly fixes it to include java_executable as the first element.

Recommendation

Merge this PR. The script remains part of the published container image and is actively used by other projects. The fix is correct, approved, and all tests pass.

@tsanders-rh
Copy link
Contributor

@shawn-hurley - can you double check me before merging?

Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense as well

@shawn-hurley shawn-hurley merged commit 43af7f2 into konveyor:main Nov 15, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants