Skip to content

Commit fc35c34

Browse files
committed
warning message
1 parent 517a34f commit fc35c34

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ private static LaunchMechanism launchMechanism() {
9797

9898
try {
9999
// Should be value of a LaunchMechanism enum
100+
String launchMechanism = s.toUpperCase(Locale.ROOT);
101+
if (s.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+
}
100108
return LaunchMechanism.valueOf(s.toUpperCase(Locale.ROOT));
101109
} catch (IllegalArgumentException e) {
102110
}

0 commit comments

Comments
 (0)