This can be caused by compile errors in Eclipse

Report
Question

Please briefly explain why you feel this question should be reported .

Report Cancel

When compiling a project in idea IDE, error occurs:
Error:osgi: [Test] 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

But when using Eclipse ide, it works.
I’ve googled times, only found this post , but it’s not my case.
I de-compiled the produced class by OSGI, there’s no class has syntax like import .
Any idea for this problem?

enter image description here

solved 0
1 Answer 43 views 0

Answer ( 1 )

    1
    January 11, 2017 at 2:30 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel

    Can you change package of your classes? That way eclipse will create new classes after compilation. Having ‘.’ package is not good practice anyway.

    Also, prefer different workspace for eclipse and intellij. Having 3 folders is good practice, one for source, one for eclipse workspace, one for intelliJ workspace. Each IDE creates their own files

    Best answer

Leave an answer

Browse

What is the capital of Egypt ? ( Cairo )

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>