While coding on an android app, I sometimes like to run javap on a class name. Howevever, in order for this to work I need all the android jar files in the classpath environment variable. To quickly do this I use the following commands:
On my laptop the I’ve got the android sdk installed in: ~/java/android-sdk-linux_86/. Hence, I want to find and add all the jar files under this directory to the classpath. In order to do this I use the find command, and use a little bash looping and IO redirection to create a file which exports the classpath.
I can then source this file on the shell and run javap!