Try using this: public static void main(String[] args) { List<String> = java.util.Arrays.toList(args); } On Dec 13, 2010, at 5:08 PM, qubit wrote:
I guess I'm missing something in your answer. On the one hand you say I can't initialize List<String> list with an array without a loop, (I canhandle that), but then you sayYou can feed that array to various lists which will > take an array, andthen you'll have it as a list.Are you saying that there is a feed method in class ArrayList that will takethe whole arg list array?Or are you saying I can pass an ArrayList<String as an arg that takes an array, or args to something that takes an ArrayList<String>? (Obviously thelast does not work.)The point is that I have a method in Process or ProcessBuilder (I don't remember which) that takes a List<String>, so I am naturally assuming thatthat is easier to come by.Oh, heck, I may just post the files without testing, but I figured it wouldsave someone else a little pain if I got them to work.Anyone who wants to enlighten my misunderstanding of java please comment.Thanx. --le ----- Original Message ----- From: "Sina Bahram" <sbahram@xxxxxxxxx> To: <brailleblaster@xxxxxxxxxxxxx> Sent: Monday, December 13, 2010 5:07 PM Subject: [brailleblaster] Re: so Sina... You don't. it comes in as an array.You can feed that array to various lists which will take an array, and thenyou'll have it as a list. Take care, Sina -----Original Message----- From: brailleblaster-bounce@xxxxxxxxxxxxx [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of qubit Sent: Monday, December 13, 2010 5:56 PM To: brailleblaster@xxxxxxxxxxxxx Subject: [brailleblaster] so Sina...If I can mix and match ByteArrays, what's wrong with this, and how do I geta List<String> out of args without a loop? And you think C++ is a tortuous pain... --le