Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for java compile/attach args #400

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

muhmud
Copy link

@muhmud muhmud commented Nov 7, 2020

Args are passed in when doing a compile/attach. This small fix addresses this issue.

(port (dap--find-available-port "localhost" dap-java-compile-port))
(program-to-start (format "%s -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=%s,quiet=y -cp $CLASSPATH_ARGS %s"
(program-to-start (format "%s -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=%s,quiet=y -cp $CLASSPATH_ARGS %s %s"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(program-to-start (format "%s -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=%s,quiet=y -cp $CLASSPATH_ARGS %s %s"
(program-to-start (format "%s -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=%s,quiet=y -cp $CLASSPATH_ARGS %s%s"

lsp-java-java-path
port
mainClass)))
mainClass
args)))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
args)))
(and args (concat " " args)))))

This will remove a trailing whitespace in the command, also handles the case of args being nil or unspecified.

@yyoncho
Copy link
Member

yyoncho commented Nov 7, 2020

This PR should be against lsp-java, dap-java was moved there. I am amazed how this PR is green considering that dap-java.el is not present in this repo...

@muhmud
Copy link
Author

muhmud commented Nov 9, 2020

This PR should be against lsp-java, dap-java was moved there. I am amazed how this PR is green considering that dap-java.el is not present in this repo...

Sorry, I saw dap-java.el in the develop branch...

I can move this to lsp-java?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants