Skip to content

Commit f94fd12

Browse files
committed
warning message
1 parent 517a34f commit f94fd12

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/java.base/unix/classes/java/lang/ProcessImpl.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,15 @@ private static LaunchMechanism launchMechanism() {
9797

9898
try {
9999
// Should be value of a LaunchMechanism enum
100-
return LaunchMechanism.valueOf(s.toUpperCase(Locale.ROOT));
100+
String launchMechanism = s.toUpperCase(Locale.ROOT);
101+
if (launchMechanism.equals("VFORK") && OperatingSystem.isLinux()) {
102+
System.err.println("""
103+
The VFORK launch mechanism has been removed. Please either remove the
104+
jdk.lang.Process.launchMechanism property (preferred) or use FORK mode
105+
instead (-Djdk.lang.Process.launchMechanism=FORK).
106+
""");
107+
}
108+
return LaunchMechanism.valueOf(launchMechanism);
101109
} catch (IllegalArgumentException e) {
102110
}
103111

0 commit comments

Comments
 (0)