开发者

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

I have classes in an Ent开发者_如何学运维ities package, but I still want to run import stuff that is in the default package... how do I do that?


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜