title: Call an Android build-tool from an Eclipse "builder"?
body: <p>I've been asked to automate the process of building a 'secondary dex' that can be loaded by a <code>DexClassLoader</code>. The idea is that instead of manually exporting to a .jar file and then running the <code>dx</code> script to add <code>classes.dex</code> to a new .jar in the main project's assets directory, normal compilation of the secondary project would automatically copy a dynamically loadable .jar to the main project.</p>
  
  <p>It does look like I can do this by marking the secondary project as an Android Library (so that it compiles to a .jar) and adding an Eclipse Builder that calls the <code>dx</code> script. I've got a bash script and a .launch wrapper for it that passes <code>${project_loc}/bin/${resource_name}.jar</code> to the script; if I place the bash script in the main project's root directory, <code>%0</code> tells me where to copy the loadable .jar.</p>
  
  <p>Of course, <code>dx</code> is not on the path. I figured I'd do a &#96;which adb&#96; and then use <code>find</code> ... but <code>adb</code> is not on the path, either!</p>
  
  <p>So, my question: Is there an Eclipse string variable that contains the location of the Android SDK?</p>