How to pass arguments in the Eclipse IDE console?

1

How to pass arguments in the Eclipse console? For example this program:

public class Eco { 
    public static void main(String[] args) {
        for(int i=0; i<args.length; i++) 
            System.out.println(args[i] + " ");
        System.out.println();
    }

}

I was able to run normally in cmd by passing an argument and it displays, and in Eclipse?

    
asked by anonymous 14.07.2015 / 20:18

1 answer

2
  • Right-click the project.
  • Go to Debug As > Debug Configurations or Run As > Run Configurations .
  • Click the Arguments tab.
  • Enter your program Program Arguments
  • Click Apply or Debug
  • Originalanswer: SOen

        
    14.07.2015 / 20:21