The following procedure has been tested on OS X 10.9.2, MacTex-2013 and TextMate 1.5.11.

Install minted and its dependency (pygmentize)

sudo easy_install pip  
sudo pip2.7 install Pygmentize  
sudo tlmgr install minted  

In TextMate go to Bundles --> LatTeX --> Preferences... and fill the Option field with the following: -shell-escape.

Declare the package in your tex file:


Now you can do:

    PrintWriter out = response.getWriter();