Closed Tired-Fox closed 4 months ago
java-debug supports a shortenCommandLine
option in the launch arguments which you can set to argfile
.
See https://github.com/microsoft/java-debug/pull/253
To pass it to tests you can call test_nearest_method
or test_class
with a { config_overrides = { ... } }
table.
E.g. the following should work:
jdtls.test_class({
config_overrides = {
shortenCommandLine = "argfile",
}
})
Thank you for the response! I appreciate all the work that you are doing.
Problem Statement
I am able to do most things I would want a Java IDE to do. However, this ends when I want to run a test with a really long classpath and the length limit is reached. The workarounds aren't so bad, but require some effort while using the plugin.
Ideas or possible solutions
I propose a toggle in the config to use the argument file feature in java versions 9+. This would mean that the arguments for commands that are run, like for dap or running main, would go into a temporary file and loaded with the argument
java @<path to temp file>
. This would solve the problems that come with a long classpath in a cli (especially on Windows).References