简体   繁体   English

Java中的导入无法解决错误

[英]Import cannot be resolved error in java

I have this import in my code : 我的代码中有此导入:

import com.sun.jdmk.cascading.CascadingAgent

but I get this error: 但是我得到这个错误:

Import com.sun.jdmk cannot be resolved

thanks for helping 谢谢你的帮助

I guess you should put the JDMK jar in the build path if you get it in compile time, or in your class path if you get the error only in runtime. 我想如果您在编译时得到JDMK jar,则应该将其放在构建路径中;如果仅在运行时得到错误,则应将其放在类路径中。

If you already have it in place, try to play with options like "clean", "rebuild" (on Eclipse) or "Make" and "Rebuild" on Intellij (you didn't mention the IDE you're using). 如果您已经安装了它,请尝试在Intellij上使用“ clean”,“ rebuild”(在Eclipse上)或“ Make”和“ Rebuild”之类的选项(您没有提到正在使用的IDE)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM