Return-Path: X-Original-To: apmail-pivot-user-archive@www.apache.org Delivered-To: apmail-pivot-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 22955E2D2 for ; Wed, 19 Dec 2012 10:57:35 +0000 (UTC) Received: (qmail 60784 invoked by uid 500); 19 Dec 2012 10:57:35 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 60633 invoked by uid 500); 19 Dec 2012 10:57:31 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 60608 invoked by uid 99); 19 Dec 2012 10:57:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2012 10:57:30 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sandro.martini@gmail.com designates 209.85.212.174 as permitted sender) Received: from [209.85.212.174] (HELO mail-wi0-f174.google.com) (209.85.212.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2012 10:57:25 +0000 Received: by mail-wi0-f174.google.com with SMTP id hm9so3503221wib.1 for ; Wed, 19 Dec 2012 02:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=cAw8paSJK8Zb5nOL00VBfMZr3SISCOqVdtHlDTZYy40=; b=wRRAbpn641BWl/l4h9EpsAnIU//z0L4eZBoAV/DoOzfxfMKrR52SIdytFIn3tTO2vd aUi49MPJ4SdcVoHPD1zc/rvjM1khJ+2cTkREiggv/7rexKtTq89p0Lz85kALZ35cOUEY lfJXYjGURfM+0IB3j52Hr6vJ5fU0mdfTqsm5pMFZv6xRkf9R4cMCzsd99Aov0uHa1k9I DmNeSclpTSR8v2cYmr5qMudXHqm5xzM2j+88sbLA1f8ZRRSnfZQ/YPBTGc7qep5zQGdr XPnF5OwDy6dJqQ9Fiptu1Ux1ibQ1/bzpOX0FfCIGYJ40CIRFszVx4LxQyjJy4lzgQ403 wrjQ== MIME-Version: 1.0 Received: by 10.194.119.33 with SMTP id kr1mr10905036wjb.4.1355914623870; Wed, 19 Dec 2012 02:57:03 -0800 (PST) Received: by 10.217.60.6 with HTTP; Wed, 19 Dec 2012 02:57:03 -0800 (PST) In-Reply-To: References: Date: Wed, 19 Dec 2012 11:57:03 +0100 Message-ID: Subject: Re: Launching application from SBT. From: Sandro Martini To: user@pivot.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Mustafa, welcome to Pivot ... > java.lang.IllegalStateException: this method can only be called from the AWT > event dispatch thread, and not from "run-main" > at org.apache.pivot.wtk.Container$1.check(Container.java:949) > at > org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:957) > ... > Could have to do with the way SBT forks the JVM to launch an application, > but still - not entirely certain. > Don't see this if I create a launcher script to launch the application. > However, I still feel that it might have something to do with the way pivot > determines the thread context. > you have reason, and this is due to a feature added in 2.0 (or 2.0.1 if I remember well) to ensure that code is run in the right thread (some in the EDT and other not in the EDT). The same problem happen if you run a Pivot project done with maven (for example using our archetype under apache-extras). Some related info here (I have to remember to update even this to Pivot-2.0.3 after released): http://apache-pivot-users.399431.n3.nabble.com/Pivot-Quickstart-Maven-archetype-updated-to-Pivot-2-0-1-td3675416.html > Just want to know if this is a bug/known bug or a feature & will need to be worked around. probably we should find a way to let common build tools like maven, sbt and gradle to bypass (or white-list related launchers) this check (if possible). To not forget it, could you create a JIRA issue for this ? Last, could you attach in the issue (and/or here) a minimal sample sbt project to simplify my tests ? This would be a great speedup for my tests ... Thanks a lot. Bye, Sandro