S note are disabled in Galaxy note 2
you said :


  when I remove the S Pen, this program is not running.


Download the Latest Version Of S-Pen And S-Note, then install.And check results.!

or you can try factory Reset.