title: args parameter in Java? (in order to use twitter4j library)
body: <p>I would like to test the twitter4j library, how could I use an arg in the main parameter, so that the program does not stop at the first parenthesis ? </p>
  
  <pre><code>public class MyTest {
  
      public static void main(String[] args) {
          if (args.length &lt; 1) { //HERE, it is always &lt; 1
              System.out.println("Usage: java twitter4j.examples.tweets.ShowStatus [status id]");
              System.exit(-1);
          }
          try {
  </code></pre>
  
  <hr>
  
  <p>EDIT :</p>
  
  <p>the complete code (I replaced the keys with <code>...</code> ) : I am actually wondering how I can ask twitter to show the details of my profile, since I only defined the keys of my app (no my account which is different).</p>
  
  <pre><code>public class MyTest {
  
      public static void main(String[] args) {
          if (args.length &lt; 1) {
              System.out.println("Usage: java twitter4j.examples.tweets.ShowStatus [status id]");
              System.exit(-1);
          }
          try {
              ConfigurationBuilder cb = new ConfigurationBuilder();
              cb.setDebugEnabled(true)
                .setOAuthConsumerKey("...")
                .setOAuthConsumerSecret("…")
                .setOAuthAccessToken("…")
                .setOAuthAccessTokenSecret("...");
              TwitterFactory tf = new TwitterFactory(cb.build());
              Twitter twitter = tf.getInstance();
  
              Status status = twitter.showStatus(Long.parseLong(args[0]));
              System.out.println("@" + status.getUser().getScreenName() + " - " + status.getText());
              System.exit(0);
          } catch (TwitterException te) {
              te.printStackTrace();
              System.out.println("Failed to show status: " + te.getMessage());
              System.exit(-1);
          }
      }
  }
  </code></pre>