you need to use Eclipse import to import the package
right click on project 
click Import
click File System

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Tue, 26 Aug 2008 14:02:59 +0200
> From: [EMAIL PROTECTED]
> Subject: Can't generate class file from Interface
> To: users@tomcat.apache.org
> 
> Hi,
> 
> 
> 
> In Eclipse 3.4 (not sure about the previous version), I have a project, in 
> the src, there is a interface file called "DatabaseCommand.java". This file 
> is an interface file.
> 
> It s content is shown below:
> 
> package command;
> 
> import java.sql.Connection;
> import java.sql.SQLException;
> 
> public interface DatabaseCommand {
>     public Object executeDatabaseOperation(Connection conn) throws 
> SQLException ;
> }
> 
> 
> 
> 
> 
> Another file CreateOrder.java *implements* this interface.
> 
> Its content shown as below:
> 
> 
> 
> Package command;
> 
> import java.sql.Connection;
> import java.sql.SQLException;
> import java.sql.Statement;
> import java.sql.ResultSet;
> import java.util.ArrayList;
> import domain.Customer;
> 
> /**
>  * List existing customers in the database
>  */
> 
> public class ListCustomers implements DatabaseCommand {
> 
>     public Object executeDatabaseOperation(Connection conn) throws 
> SQLException {
>         // List customers in the database
>         
>         ArrayList<Customer> list = new ArrayList<Customer>();
>         Statement sta = conn.createStatement();
>         ResultSet rs = sta.executeQuery("SELECT ID, FIRST_NAME, 
> LAST_NAME, ADDRESS FROM CUSTOMER");
>         while(rs.next()) {
>             Customer cust = new Customer();
>             cust.setId(rs.getInt(1));
>             cust.setFirstName(rs.getString(2));
>             cust.setLastName(rs.getString(3));
>             cust.setAddress(rs.getString(4));
>             list.add(cust);
>         }
>         
>         rs.close();
>         sta.close();
>         
>         return list;
>     }
> }
> 
> 
> 
> When I press Clt-B to build the project(All), DatabaseCommand.java does not 
> get compiled, no DatabaseCommand.class generated in the 
> build\classes\command\ directory. The syntax highlithed in the 
> CreateOrder.java file indicated that DatabaseCommand is an unknown type, 
> that meant no class found.
> 
> 
> 
> How can I get around this issue? may be I should ask how to generate an 
> interface dot class file (eg. DatabaseCommand.class in this instance)?
> 
> 
> 
> Thanks
> 
> Sam
> 
> 

_________________________________________________________________
See what people are saying about Windows Live.  Check out featured posts.
http://www.windowslive.com/connect?ocid=TXT_TAGLM_WL_connect2_082008

Reply via email to