Pet*_*ter 5 java osgi intellij-idea aem
尝试使用Intellij IDEA运行@ org.junit.Test。
这是一个OSGi套件,当点击Run'testMyTest'
获取以下异常:
Error:osgi: [b2b-bundle] The default package '.' is not permitted by the Import-Package syntax.
This can be caused by compile errors in Eclipse because Eclipse creates
valid class files regardless of compile errors.
The following package(s) import from the default package null
Run Code Online (Sandbox Code Playgroud)
有人可以就这个例外情况发表看法吗?
谢谢彼得
您可能没有将类放在包中。
添加
package your_package_name;
Run Code Online (Sandbox Code Playgroud)
在 .java 文件的顶部,你应该很好。
PS:根据您的包名称,您可能还需要将文件移动到其他位置
| 归档时间: |
|
| 查看次数: |
8531 次 |
| 最近记录: |