title: Android JDK 7 wildcard imports
body: <p>I am experimenting with developing Phonegap plugins for Android using the Phonegap CLI and JDK 7.  Time and time again I have found that wildcard imports do not work and I have to explicitly import each class that I need to use.  A case in point.  I am currently playing with using Rhino to run JS without a WebView.  The code samples I find out there suggest <code>import org.mozilla.javascript.*</code> which starts throwing up compiler errors as soon as I put in code that uses the Rhino <code>Context</code> etc objects.  In order to be able compile correctly I need to do a whole series of explicit imports.  e.g.</p>
  
  <pre><code>import org.mozilla.javascript.Context;
  import org.mozilla.javascript.Scriptable;
  import org.mozilla.javascript.ScriptableObject;
  import org.mozilla.javascript.Function;
  import org.mozilla.javascript.NativeObject;
  </code></pre>
  
  <p>Without such imports I end up with error messages along the lines of</p>
  
  <pre><code>cannot find symbol
  
  NativeObject result = (NativeObject)     
  function.call(rhino,scope,scope,functionParams);  
  symbol:   class NativeObject
  </code></pre>
  
  <p>Is this a constraint imposed by Phonegap or something that got introduced with JDK 7 (I assume that most of the sample code I am depending on predates JDK 7) or something else altogether.  I can see how the Context object in Android can create a conflict here but I am equally certain that I am not accidentally using other classes that define Scriptable, ScriptableObject etc.</p>
  
  <p>I'd be most grateful to anyone who might be able to clarify.</p>