facebook

[Closed] Command line arguments

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #267767 Reply

    neom3x11
    Member

    This may be a very elementary question because I am new to MyEclipse, but if my Java application accepts command line arguments, is there a quicker way to run the application with user-specified arguments than to go up to the toolbar, click Run…, click the Arguments tab, type the arguments in the box, and click Run?

    Thanks, your help’s much appreciated!

    #267773

    Riyad Kalla
    Member

    Not that I know of, that’s how I would do it.

    #267776

    neom3x11
    Member

    Thanks, seems like a big hassle, oh well.

    #267779

    Riyad Kalla
    Member

    If the command line args are common, you could setup multiple launch targets for the same app all with different args.

    But I could see how it would still be a pain.

    #267793

    jhm
    Member

    Another way is writing a starter class …

    public class Starter {
        public static void main(String args) {
            String[] newArgs = new String[]{"one", "two", "three"};
            MyOriginalMainClass.main(newArgs);
        }
    }

    Then just edit this class. Because of the autobuild feature there is no big delay …

    #267808

    Scott Anderson
    Participant

    Actually, once you set up the launch configuration one time, you can simply select that configuration from the run dropdown menu. To set it up for the first time select Run > Run… > Java Application etc, configure the arguments, and then save the launch config. From then on it will be available from the menu and toolbar items from then on.

    #267824

    neom3x11
    Member

    Again, thank you for your continued assistance! I’ve always found online programming communities to be very helpful.

    I think I might try jhm’s method so that I can alter the arguments quickly each time I run the application. However, I will keep the other suggestions in mind.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: [Closed] Command line arguments

You must be logged in to post in the forum log in