Hi

I have a problem about packages.I am not sure whether I can discuss it in this 
forum.But I am sending it anyway

I have two classes DebugWriter and ConnectionManager and an interface called 
AppConstants in a package named Tbean.test.

When I am trying to compile ConnectionManager file , I am getting the following error 
messages

ConnectionManager.java:10: cannot resolve symbol
symbol  : class AppConstants
location: class Tbean.test.ConnectionManager
public class ConnectionManager implements AppConstants {
                                          ^
ConnectionManager.java:18: cannot resolve symbol
symbol  : class DebugWriter
location: class Tbean.test.ConnectionManager
        protected DebugWriter writer;
                  ^
ConnectionManager.java:24: cannot resolve symbol
symbol  : class DebugWriter
location: class Tbean.test.ConnectionManager
                writer = new DebugWriter();

The source code for the three files is included here.These are very small files

Advance thanks

Regards

Sri



------------AppConstants.java----------------

package Tbean.test;

public interface AppConstants {
 public static final String driverClass = "driverClass";
 public static final String connection  = "connection";
 public static final String conError    = "conError";
 public static final String paramBase   = "paramBase";
 public static final String userId      = "userId";
 public static final String password    = "password";
 public static final String selectType  = "selectType";
}

--------------- DebugWriter.java---------------

package Tbean.test;

import java.io.*;
import java.util.Date;

public class DebugWriter  {
 public void writeDebug(String s) {
  writeDebug(s,debugFile);
 }

 public void writeDebug(String s,String sFile) {
  FileOutputStream fos = null;
  try {
   //test for the existence of the file
   File f = new File(sFile);
   if (!f.exists()) {
    fos = new FileOutputStream(f);
   } else {
    //we want to append to the end of the file
    fos = new FileOutputStream(sFile,true);
   }
   s += "\n";
   //pre-pend a date time string
   fos.write((new Date(System.currentTimeMillis()).toString() +
       ":" + s).getBytes());
  } catch (Exception ex) {
   System.out.println("Error writing debug log in writeDebug : "+ex);
  } finally {
   try {
    fos.close();
   } catch (Exception ex) {}
  }
 }

 public void setDebugFileName(String s) {
  debugFile = s;
 }

 private String debugFile = "errors.log";
}

---------------ConnectionManager.java-----------------

package Tbean.test;

import java.io.*;
import java.util.*;
import java.beans.*;
import java.sql.*;
import Tbean.test.*;


public class ConnectionManager implements AppConstants {
 /** The debug boolean - default is false */
 private boolean debug = false;
 protected Connection con;
 protected String driver;
 protected String passwd;
 protected String url;
 protected String user;
 protected DebugWriter writer;
 PropertyChangeSupport pcs ;

 public ConnectionManager () {
  //AppConstants ap = new AppConstants();
  pcs = new PropertyChangeSupport(this);
  writer = new DebugWriter();
 }
}







---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to