vscode-java-debug
vscode-java-debug copied to clipboard
Can not add additional classpath
[provide a description of the issue]
Environment
- Operating System: wsl (Arch)
- JDK version: 1.8
- Visual Studio Code version: 1.85.1
- Java extension version: v1.25.1
- Java Debugger extension version: v0.55.0
Steps To Reproduce
-
my launch.json { "type": "java", "name": "Application", "request": "launch", "mainClass": "Application", "projectName": "roc-domestic-web", "shortenCommandLine": "auto", "classPaths": [ "$Auto", "~/workspace/domestic-shopping/roc-domestic-common/target/classes/", ], }
-
launch command line /usr/bin/env /usr/lib/jvm/java-8-openjdk/jre/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:41833 -cp /tmp/cp_aiaqxn8lxgly17gkhnct4os82.jar Application
Current Result
classpath can't have the classpath that I added
Expected Result
can append my customized classpath
Can you replace "~" with the absolute path?
no , I had tried it , absolute path is the same issue
I know the reason , the classpath is written to MANIFEST.MF when ShortenCommandLine = 'jarmanifest', but I want to add additional classpath alone, like '-cp /tmp/cp_aiaqxn8lxgly17gkhnct4os82.jar;. xxx/', is it supported now?
I want to add additional classpath alone, like '-cp /tmp/cp_aiaqxn8lxgly17gkhnct4os82.jar;. xxx/', is it supported now
Unfortunately, this feature is not supported. When the shortenCommandLine configuration is enabled, it will generate the complete classpath into a temporary file.
If you don't want it to be added to the tmp .jar, you can turn off the shortenCommandLine setting.
If I turn off the shortenCommandLine setting, command line is to long , it can not run
Could you please clarify why the default behavior, where the additional classpath is generated into the temporary .jar file, is not suitable for your needs?
Actually, I hope shortenCommonLine can support classpath file , like idea ,
because we have to read resource file in our project, if classpath is a jar, my project could not unzip it