maven编译时无法识别com.sun包
项目中使用了com.sun
包下的类,该包是sun公司不对外开源的代码。使用mvn compile
命令进行编译时报错:
javac uses a special symbol table that does not include all Sun-proprietary classes. When javac is compiling code it doesn't link against rt.jar by default. Instead it uses special symbol file lib/ct.sym with class stubs.
相应的java源码文件中也会出现红线。