Re: Can two classes with the same co-exist?
- From: Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx>
- Date: Fri, 29 Aug 2008 13:54:24 -0400
laredotornado wrote:
Hi,
I'm using Java 1.5 . I currently have two imports that use the same
class name:
import javax.faces.application.Application;
import com.myco.nps.im.dto.applications.Application;
Unsurprisingly, when I compile, I get the compilation error
[javac] /export/third-party/etsbea/staging/wls_9.2.2/
nps_config_gui/src/com/myco/npsconfig/jsf/controllers/
AddApplicationPage.java:27: javax.faces.application.Application is
already defined in a single-type import
[javac] import com.myco.nps.im.dto.applications.Application;
I didn't write either class but I need them both. Any way I can get
around this compilation error?
Fully qualified names:
javax.faces.application.Application app = /*...*/;
I would import the one you use the most.
--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.
- References:
- Can two classes with the same co-exist?
- From: laredotornado
- Can two classes with the same co-exist?
- Prev by Date: Can two classes with the same co-exist?
- Next by Date: Re: Can two classes with the same co-exist?
- Previous by thread: Can two classes with the same co-exist?
- Next by thread: Re: Can two classes with the same co-exist?
- Index(es):
Relevant Pages
|