How to Pass Commandline Arguments and Properties #536
-
Is it possible to pass command line arguments to Java configurations? And is it possible to pass JVM properties? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
You can add Not sure if there is also proper documentation for it somewhere. Here is an example of it being used: https://github.com/crate/crate/blob/e1dea641515e57f61e77dcd34d8b2de042878bbf/.vscode/launch.json#L4-L13 And I recommend to use it with nvim-jdtls, otherwise you need to also define the full classpath and so on. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I did not find it in the documentation (not in nvim-jdtls' or in nvim-dap) so i wasn't aware of these options. A follow-up question: is it possible to configure them for a one shot start? I could imaging that |
Beta Was this translation helpful? Give feedback.
-
Just gonna hijack this because it's somewhat related: i'm trying to get nvim-dap to work with jmockit, apparently as of JMockit 1.42 it requires a I've tried adding it like this: dap.configurations.java = {
request = "launch",
type = "java",
vmArgs = "-javaagent:/home/andrej/.m2/repository/org/jmockit/jmockit/1.49/jmockit-1.49.jar"
} Is this correct? I can't get it to work properly. Tests run fine via Maven. A dependency annotated with Regards |
Beta Was this translation helpful? Give feedback.
You can add
args
andvmArgs
. See https://github.com/microsoft/java-debug/blob/625fe84cef4825a4b6b476d04383f5168e81708d/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/protocol/Requests.java#L104-L119Not sure if there is also proper documentation for it somewhere.
Here is an example of it being used: https://github.com/crate/crate/blob/e1dea641515e57f61e77dcd34d8b2de042878bbf/.vscode/launch.json#L4-L13
And I recommend to use it with nvim-jdtls, otherwise you need to also define the full classpath and so on.