Unable to see classpath when running in shorten command line mode

已回答

I am using IntelliJ IDEA 2022.2.1 and when running a junit test case in 'shorten command line classpath' mode, a classpathfile is created
inside folder

c:\users\<windows_login>\AppData\Local\Temp

and fed to java command line.  This file disappears right away and there is no way to check what classpath was used by the testcase. Same
situation when running in 'shorten command line JAR manifest' mode as well, the created jar in the same folder, disappears right away.

To be able to debug issues, is there way deletion of the classpath file or the jar file could be disabled and available for inspection after the test case finishes. Calling 'ClassLoader.getSystemClassLoader()' inside the test case, does not fetch classpath components inside the
classpath file. 

评论操作 固定链接

Hi,

Please try to add this line to your test case as a workaround:

System.out.println("classpath=" + System.getProperty("java.class.path"));
0

请先登录再写评论。