Could not copy property 'committedVirtualMemorySize' from source to target; module jdk.management does not "opens com.sun.management.internal" to unnamed module
一、报错信息
Could not copy property 'committedVirtualMemorySize' from source to target; nested exception is java.lang.reflect.InaccessibleObjectException: Unable to make public long com.sun.management.internal.OperatingSystemImpl.getCommittedVirtualMemorySize() accessible: module jdk.management does not "opens com.sun.management.internal" to unnamed module
二、报错描述
在新引进maven工程时,启动成功后,反复报错
3、解决方法
https://stackoverflow.com/questions/58492387/unable-to-make-public-long-com-sun-management-internal-operatingsystemimpl-getco
可知是版本问题,项目导入默认版本为jdk.11, 更换版本为1.8解决