title: packaging application in java avoiding imports
body: <p>I have application building using third party apis, j2me apis,application code distributed in various java packages.</p>
  
  <p>in user interface class device specific code is not to be imported, but it is required.</p>
  
  <p>while building the application using tools like ant, building separate package as jar is not possible now because various packages are importing code from other packages etc. </p>
  
  <p>i am trying to separate each package with interfaces but not always possible.
  still at few places code from user interface layer is required in ui specific code. also third party application source code is modified to develop the application. so in future next release of third party jar can not be used as it is, need to get source code , modify it and then include.</p>
  
  <p>is there better way to develop application with minimizing package interactions?</p>