How do you know it doesn't see them?
Try putting the following for loop into your main method and then decide
whether your program sees the arguments or not
for (String arg : args) {
System.out.println(arg);
}
if you used some name other than "args" for the String array in the parameter section of your main method declaration than replace "args" with the name you used.
If you still believe that your program does not "see" the arguments, then please post the main method of your program (as you should have done in the first place).
Thanks for your reply!
I'm sure because args.length is zero, and I watch args in Localwatch and ther's nothing there. I also print .
Now I use exactly args and nothing else.
If you ment I copy the main method - here it is :
public static void main( String[] args) {
System.err.println("in Client main");
if (args.length!=0){
System.err.println("port passed= "+port);
port = Integer.parseInt(args[0] ); }
else port = 5002;
FourInLineClient2 application = new FourInLineClient2 ();
application.setDefaultCloseOperation(
JFrame.EXIT_ON_CLOSE );
application.execute();
}
It seems okay, other than the fact that port is seemingly a static int class variable. That would, I think, be better solved by giving the "FourInLineClient" class a constructor that takes an int as a parameter so that the port can then be an instance variable rather than having to be a static class variable, but that is probably more personal preference than anything else. (at least I assume it is this class that uses that port variable and that includes the posted main method)
The only thing else I can say, is to follow the advice posted by ChuckBing in the other thread and make sure that you are entering the command line parameters correctly and if the problem persists post on the NetBeans mailing list.