一、问题描述
Connected to the target VM, address: ‘127.0.0.1:62045’, transport: ‘socket’
错误: 在类 com.chaoyue.tengxunsms.SendSms 中找不到 main 方法, 请将 main 方法定义为:
public static void main(String[] args)
否则 JavaFX 应用程序类必须扩展javafx.application.Application
Disconnected from the target VM, address: ‘127.0.0.1:62045’, transport: ‘socket’
二、解决方法
运行时选择的启动类不对,应选带main方法的启动类,如springboot自动创建的启动类: