Eclipse + Java: How do I import classes from the default package?

前端 未结 1 1851
眼角桃花
眼角桃花 2021-01-25 12:22

I have classes in an Entities package, but I still want to run import stuff that is in the default package... how do I do that?

相关标签:
1条回答
  • 2021-01-25 12:55

    You don't.

    Sorry.

    Though I'm quoting the other answer, you can check out the ORACLE reference that says that that is intended behaviour.

    I recommend moving your stuff to a named package.

    If you absolutely cannot re-factor, you can try using reflection to access it. Again, check the answer linked above.

    0 讨论(0)
提交回复
热议问题