Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1118A9AB8 for ; Thu, 23 Aug 2012 22:44:00 +0000 (UTC) Received: (qmail 69418 invoked by uid 500); 23 Aug 2012 22:43:59 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 69385 invoked by uid 500); 23 Aug 2012 22:43:59 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 69377 invoked by uid 99); 23 Aug 2012 22:43:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2012 22:43:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of justinmclean@gmail.com designates 209.85.160.47 as permitted sender) Received: from [209.85.160.47] (HELO mail-pb0-f47.google.com) (209.85.160.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2012 22:43:51 +0000 Received: by pbcwy7 with SMTP id wy7so2312301pbc.6 for ; Thu, 23 Aug 2012 15:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; bh=6A87wdlYqi+X2SKSwKMj3T24SmgPsKKR8hAbd7/FQq4=; b=xs03F8+M69sflwxJrkfUakQeE2ZzSzOhVttUls7y/UHasJitJtMMHe+fn1pXFW2S6x JIpN06JjzUDFxN76BS/xRDeF2tcQNEuNhrQfAqKgmeykwpLQ6psCMYNZVmiGrEKtmJXC ajnFad1XC3QzbVO3IALufD1lNqwqTEXKpdxR47Z0IS5mbV5GlyF5fg9gqonnd5/lcWjs 5griDb7fUlCEbnvFs6kybf5OWcHUJ//0WlvQSWnWRfIIO7v0nuou9t9dva2p7+9MqjwN S1ozMdN+9dLmx7d9e7MIqlGuVsGtdEqwRP8jk/nCrb2icU/92L1rZOhtbaBfXIvv/I/y pRrA== Received: by 10.66.77.40 with SMTP id p8mr6354566paw.78.1345761811000; Thu, 23 Aug 2012 15:43:31 -0700 (PDT) Received: from [192.168.0.9] (124-149-46-91.dyn.iinet.net.au. [124.149.46.91]) by mx.google.com with ESMTPS id po4sm3793291pbb.13.2012.08.23.15.43.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 15:43:29 -0700 (PDT) Sender: Justin Mclean From: Justin Mclean Mime-Version: 1.0 (Apple Message framework v1280) Content-Type: multipart/alternative; boundary="Apple-Mail=_3123AEE5-1A3E-4E41-9F06-8BC9036D380D" Subject: Re: Getting Mustella to work. Date: Fri, 24 Aug 2012 08:43:24 +1000 In-Reply-To: To: flex-dev@incubator.apache.org References: Message-Id: <57BFC046-4578-4BC2-BD2E-E96AB8D981AF@classsoftware.com> X-Mailer: Apple Mail (2.1280) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_3123AEE5-1A3E-4E41-9F06-8BC9036D380D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, > I think I found that quotes are ok even on Mac. Isn't the code that = makes > the initial command line building it up out of pieces? If so, I'd add = the > quotes as the initial command line is getting built up. Need to be adde din about a dozen places but that's not too hard. = However it still fails as the spilt ignore quotes. This is the offending line: defaultArgs=3DStringUtils.StringToArray(args); Something along the lines of this may work (assuming quotes have been = added). Matcher match =3D = Pattern.compile("([^\\S]*\"[^\"]*\")|(\\S+)").matcher(args); ArrayList argList =3D new ArrayList(); =20 while (match.find()) { if (match.group(1) =3D=3D null) { argList.add(match.group(2)); } else { argList.add(match.group(1)); } } Anyone want to give it a go/come up with a better regex? The better way to fix as Peter said would just to use an Array/arrayList = and not go back and forth between Arrays and Strings. Thanks, Justin --Apple-Mail=_3123AEE5-1A3E-4E41-9F06-8BC9036D380D--