Skip to content

Instantly share code, notes, and snippets.

@mattmcd
Created March 30, 2013 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattmcd/5277466 to your computer and use it in GitHub Desktop.
Save mattmcd/5277466 to your computer and use it in GitHub Desktop.
Installing ANTLR 4.0 in TerminalIDE on a Nexus 7
1. Modify ~/system/bin/dx to increase memory size:
#dx helper script
dalvikvm -Xms256m -Xmx512m -cp $APK com.spartacusrex.spartacuside.external.dx $@
2. Download [Complete ANTLR 4.0 Java binaries jar](http://www.antlr.org/download/antlr-4.0-complete.jar) and copy to ~/bin. Change to this directory.
3. Convert jar to dex so that it can run on Android (takes about 20mins with power connected):
dx --dex --output=antlr-4.0.dex.jar antlr-4.0-complete.jar
4. Create batch script antlr4 (or alias) containing wrapper to call the dex file:
java -jar ~/bin/antlr-4.0.dex.jar org.antlr.v4.Tool "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment