File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,19 +10,20 @@ import { commandExists } from '../util';
1010
1111type JvmTarget = { pid : string , name : string , interceptedByProxy : number | undefined } ;
1212
13- // Check that Java is present, and that it's possible to run list-targets
13+ // Check that Java is present, and that it's compatible with agent attachment:
1414const isJavaAvailable = commandExists ( 'java' ) . then ( async ( isAvailable ) => {
1515 if ( ! isAvailable ) return false ;
1616
1717 const result = await spawnToResult (
1818 'java' , [
19+ '-Djdk.attach.allowAttachSelf=true' , // Required for self-test
1920 '-jar' , OVERRIDE_JAVA_AGENT ,
20- 'list-targets '
21+ 'self-test '
2122 ]
2223 ) ;
2324
24- // If Java is present, but it's working, we report it. Hoping that this will hunt done
25- // some specific incompatibilities that we can better work around/detect.
25+ // If Java is present, but it's not working, we report it. Hoping that this will hunt
26+ // down some specific incompatibilities that we can better work around/detect.
2627 if ( result . exitCode !== 0 ) {
2728 console . log ( result . stdout ) ;
2829 console . log ( result . stderr ) ;
You can’t perform that action at this time.
0 commit comments