Skip to content

Commit ed83281

Browse files
committed
improve recognition of nodejs
1 parent 925ac3c commit ed83281

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

visualvm/graalvm/src/org/graalvm/visualvm/graalvm/application/type/GraalVMApplicationTypeFactory.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class GraalVMApplicationTypeFactory extends MainClassApplicationTypeFacto
4747
private static final String PYTHON_MAIN_CLASS = "com.oracle.graal.python.shell.GraalPythonMain"; // NOI18N
4848
private static final String LLVM_MAIN_CLASS = "com.oracle.truffle.llvm.launcher.LLVMLauncher"; // NOI18N
4949
private static final String GRAAL_SYSPROP_ID = "graalvm.home"; // NOI18N
50+
private static final String GRAAL_SYSPROP1_ID = "org.graalvm.home"; // NOI18N
5051
private static final String JVM_ARG_GRAAL_ID = "-D"+GRAAL_SYSPROP_ID+"="; // NOI18N
5152
private static final String JVM_ARG_GRAAL1_ID = "-Dgraal.CompilerConfiguration="; // NOI18N
5253
private static final String ARG_GRAAL_ID = "--"; // NOI18N
@@ -94,8 +95,11 @@ private boolean isGraalVM(Jvm jvm, String mainClass) {
9495
if (jvm.isGetSystemPropertiesSupported()) {
9596
Properties sysProp = jvm.getSystemProperties();
9697

97-
if (sysProp != null && sysProp.getProperty(GRAAL_SYSPROP_ID) != null) {
98-
return true;
98+
if (sysProp != null) {
99+
if (sysProp.getProperty(GRAAL_SYSPROP_ID) != null
100+
|| sysProp.getProperty(GRAAL_SYSPROP1_ID) != null) {
101+
return true;
102+
}
99103
}
100104
}
101105
}

0 commit comments

Comments
 (0)