title: Packaging Blackberry OAuth app throwing error
body: <p>I am creating an application that will post a link onto Twitter. The following code refuses to package up for me, throwing the following error:</p>
  
  <blockquote>
    <p>Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>public class ShowAuthBrowser extends MainScreen implements OAuthDialogListener
  {
      private final String CONSUMER_KEY = "&lt;Consumer&gt;";   
      private final String CONSUMER_SECRET = "&lt;Secret&gt;";
      private LabelField _labelStutus;
      private OAuthDialogWrapper pageWrapper = null;
      public StoreToken _tokenValue;
      public BrowserField b = new BrowserField();
      Manager _authManager;
      Manager _pinManager;
      ButtonField authButton;
      TextField authPin;
  
      public ShowAuthBrowser()    
      {   
          _authManager = new VerticalFieldManager(NO_VERTICAL_SCROLL |
                                                  NO_VERTICAL_SCROLLBAR);
          _pinManager = new HorizontalFieldManager(NO_VERTICAL_SCROLL |
                                                   NO_VERTICAL_SCROLLBAR);
          authButton = new ButtonField("OK");
          authPin = new TextField(Field.EDITABLE);
          _authManager.add(_labelStutus );
          _authManager.add(b);
  
          _pinManager.add(authButton);
          _pinManager.add(authPin);
  
  
          pageWrapper = new BrowserFieldOAuthDialogWrapper(b,CONSUMER_KEY,
                              CONSUMER_SECRET,null,this);
          pageWrapper.setOAuthListener(this);     
  
          add(_pinManager);
          add(_authManager);
  
          authButton.setChangeListener( new FieldChangeListener( ) {
              public void fieldChanged( Field field, int context ) {
                  if( field == authButton ) {
                         doAuth(authPin.getText());
                  }
              }
          } );
  
      }
  
      public void doAuth( String pin )
      {
          try
          {
              if ( pin == null )
              {
                  pageWrapper.login();
              }
              else
              {
                  this.deleteAll();
                  add(b);
                  pageWrapper.login( pin );
              } 
  
          }
          catch ( Exception e )
          {
              final String message = "Error logging into Twitter: " + 
                                                  e.getMessage();
              Dialog.alert( message );
          }           
      }
  
      public void onAccessDenied(String response ) {
  
          updateScreenLog( "Access denied! -&gt; " + response );
  
      }
  
      public void onAuthorize(final Token token) {
  
          final Token myToken = token;
          _tokenValue = StoreToken.fetch();
          _tokenValue.token = myToken.getToken();
          _tokenValue.secret = myToken.getSecret();
          _tokenValue.userId = myToken.getUserId();
          _tokenValue.username = myToken.getUsername();
          _tokenValue.save();
  
          UiApplication.getUiApplication().invokeLater( new Runnable() {
  
              public void run() {
                  deleteAll();
                  Credential c = new Credential(CONSUMER_KEY, 
                                                CONSUMER_SECRET, 
                                                myToken);
                  PostTweet tw = new PostTweet();
                  String message="Testing BB App";
                  boolean done=false;
                  done=tw.doTweet(message, c);
                  if(done == true)
                  {
                      Dialog.alert( "Tweet succusfully..." );
                      close();    
                  }
              }
          });
  
      }
  
      public void onFail(String arg0, String arg1) {
          updateScreenLog("Error authenticating user! -&gt; " + arg0 + ", " + arg1);
      }
  
      private void updateScreenLog( final String message )
      {
          UiApplication.getUiApplication().invokeLater( new Runnable() {
  
              public void run() {
                  _labelStutus.setText( message );                
              }
          });
      }
  }
  </code></pre>
  
  <p>The odd thing is, if I remove the following lines, it packages just fine:</p>
  
  <pre><code>authButton.setChangeListener( new FieldChangeListener( ) {
          public void fieldChanged( Field field, int context ) {
              if( field == authButton ) {
                     doAuth(authPin.getText());
              }
          }
      } );
  </code></pre>
  
  <p>Any help would be appreciated as I really need the field listener attached to this screen.</p>
  
  <p>With code like <code>authButton.setChangeListener(null)</code>, it does package successfully however I do need code with <code>FieldChangeListener</code> to do something.</p>