The method startVirtualThread() is undefined for the type Thread
JDK19
public static Thread startVirtualThread(Runnable task) {
Objects.requireNonNull(task);
PreviewFeatures.ensureEnabled();
var thread = ThreadBuilders.newVirtualThread(null, null, 0, task);
thread.start();
return thread;
}