Results 1 to 4 of 4
  1. #1
    bugger is offline Senior Member
    Join Date
    Nov 2007
    Posts
    111
    Rep Power
    0

    Default How to generate main method stub in Eclipse

    I know how to generate main method stub in Eclipse while declaring a class using Eclipse wizard for class creation. But if I don't check the "Generate main method" preference, how can later I generate main method stub.

    I don't want to manually write the code.

    Please advice.

  2. #2
    kbyrne is offline Member
    Join Date
    Dec 2007
    Posts
    15
    Rep Power
    0

    Default

    Assuming content assist is turned on, you could use this the control and space key to create it.

    type ma then control and spacebar key simultaneously and you should get an option co create a main method. of course then you're left with instanciating the class.

  3. #3
    bugger is offline Senior Member
    Join Date
    Nov 2007
    Posts
    111
    Rep Power
    0

    Default

    Thanks mate. I just tested it and it worked.

    Keep posting :D

  4. #4
    kbyrne is offline Member
    Join Date
    Dec 2007
    Posts
    15
    Rep Power
    0

    Default

    No problem buddy, there's a list of top ten tips for shortcuts using eclipse. We were given a presentation on it by IBM.

    I just checked it and here it is, pretty sure that's all of it.
    Anyways, happy programming

    Top 10 Tips For New Eclipse Users - simply complex

Similar Threads

  1. Calling main method
    By eva in forum New To Java
    Replies: 7
    Last Post: 11-06-2009, 01:37 PM
  2. A query about main method
    By mew in forum New To Java
    Replies: 2
    Last Post: 12-24-2007, 09:44 AM
  3. Private main method
    By bugger in forum New To Java
    Replies: 1
    Last Post: 12-21-2007, 09:45 AM
  4. main method
    By eva in forum New To Java
    Replies: 5
    Last Post: 12-19-2007, 09:25 AM
  5. The main method in java...
    By lenny in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 06:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •