Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Import cannot be resolved
Import cannot be resolved [message #179826] Mon, 13 November 2006 10:57 Go to next message
Eclipse UserFriend
Originally posted by: dale.4drealtime.co.za

Right-click on Project, New->Package (name test)

Right-click on htmlPkg, New->Class (name Test)

From another pkg in same project, add 'import test;'

Eclipse says 'Import test cannot be resolved'.

Why is test not visible elsewhere in the current Project?

From About:
=========
Eclipse SDK

Version: 3.2.1
Build id: M20060921-0945
=========
Re: Import cannot be resolved [message #179834 is a reply to message #179826] Mon, 13 November 2006 11:08 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
Dale wrote:
>
> Right-click on Project, New->Package (name test)
>
> Right-click on htmlPkg, New->Class (name Test)
>
> From another pkg in same project, add 'import test;'
>
> Eclipse says 'Import test cannot be resolved'.
>
> Why is test not visible elsewhere in the current Project?
>
> From About:
> =========
> Eclipse SDK
>
> Version: 3.2.1
> Build id: M20060921-0945
> =========
>

'import' is used in Java to import class definitions, not packages.
Either import a specific class from the 'test' package (import
test.Foo;) or all classes from the package (import test.*;)

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: Import cannot be resolved [message #179857 is a reply to message #179834] Mon, 13 November 2006 11:47 Go to previous message
Eclipse UserFriend
Originally posted by: dale.4drealtime.co.za

I knew it was obvious but not *that* obvious. Sorted it out now...

Thanks!
Previous Topic:How to install HSQLDB in Eclipse ?
Next Topic:Subject: x86_64 Eclipse does not start up
Goto Forum:
  


Current Time: Thu Apr 25 14:51:03 GMT 2024

Powered by FUDForum. Page generated in 0.07942 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top