You need to define the arguments in:
Project -> Properties -> Run
Carlos
On 10/17/2009 1:26 PM, hyperaura wrote:
> hello there, i've downloaded Netbeans IDE to write a program in java. the following is just to try out how to pass arguments in netbeans but something seems to go wrong in netbeans. working environment is windows and i've also installed jdk1.6.
>
>
>
> public class ArgsExmpl {
>
> public static void main(String [] args)
>
> {
>
> System.out.println(args[0]);
>
> }
>
> }
>
>
>
> the error i'm getting is the following:
>
>
>
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
>
> at ArgsExmpl.main(ArgsExmpl.java:12)
>
> Java Result: 1
>
>
>
>
>
>