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
49
49
private static final String LLVM_MAIN_CLASS = "com.oracle.truffle.llvm.launcher.LLVMLauncher" ; // NOI18N
50
50
private static final String GRAAL_SYSPROP_ID = "graalvm.home" ; // NOI18N
51
51
private static final String GRAAL_SYSPROP1_ID = "org.graalvm.home" ; // NOI18N
52
+ private static final String LAUNCHER_SYSPROP_ID = "org.graalvm.launcher.class" ; // NOI18N
52
53
private static final String JVM_ARG_GRAAL_ID = "-D" +GRAAL_SYSPROP_ID +"=" ; // NOI18N
53
54
private static final String JVM_ARG_GRAAL1_ID = "-Dgraal.CompilerConfiguration=" ; // NOI18N
54
55
private static final String ARG_GRAAL_ID = "--" ; // NOI18N
@@ -114,6 +115,13 @@ private String getLangID(Jvm jvm) {
114
115
String args = jvm .getMainArgs ();
115
116
String mainClass = jvm .getMainClass ();
116
117
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
+ }
117
125
if (LEGACY_MAIN_CLASS .equals (mainClass )) {
118
126
if (args != null ) {
119
127
String [] argArr = args .split (" +" );
You can’t perform that action at this time.
0 commit comments