File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
visualvm/graalvm/src/org/graalvm/visualvm/graalvm/application/type Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ public class GraalVMApplicationTypeFactory extends MainClassApplicationTypeFacto
4949 private static final String LLVM_MAIN_CLASS = "com.oracle.truffle.llvm.launcher.LLVMLauncher" ; // NOI18N
5050 private static final String GRAAL_SYSPROP_ID = "graalvm.home" ; // NOI18N
5151 private static final String GRAAL_SYSPROP1_ID = "org.graalvm.home" ; // NOI18N
52+ private static final String LAUNCHER_SYSPROP_ID = "org.graalvm.launcher.class" ; // NOI18N
5253 private static final String JVM_ARG_GRAAL_ID = "-D" +GRAAL_SYSPROP_ID +"=" ; // NOI18N
5354 private static final String JVM_ARG_GRAAL1_ID = "-Dgraal.CompilerConfiguration=" ; // NOI18N
5455 private static final String ARG_GRAAL_ID = "--" ; // NOI18N
@@ -114,6 +115,13 @@ private String getLangID(Jvm jvm) {
114115 String args = jvm .getMainArgs ();
115116 String mainClass = jvm .getMainClass ();
116117
118+ if ((mainClass == null || mainClass .isEmpty ()) && jvm .isGetSystemPropertiesSupported ()) {
119+ Properties sysProp = jvm .getSystemProperties ();
120+
121+ if (sysProp != null ) {
122+ mainClass = sysProp .getProperty (LAUNCHER_SYSPROP_ID );
123+ }
124+ }
117125 if (LEGACY_MAIN_CLASS .equals (mainClass )) {
118126 if (args != null ) {
119127 String [] argArr = args .split (" +" );
You can’t perform that action at this time.
0 commit comments