pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mustafa Motiwala <mustafa.motiw...@gmail.com>
Subject Launching application from SBT.
Date Tue, 18 Dec 2012 08:09:07 GMT
Hi,
Migrating an old project from Java to Scala, and we are using SBT for this.
Trouble is, when I try to launch the application from SBT get the following:


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)
at org.apache.pivot.wtk.Component.invalidate(Component.java:1955)
at org.apache.pivot.wtk.Container.invalidate(Container.java:874)
at org.apache.pivot.wtk.Component.setSkin(Component.java:788)
at org.apache.pivot.wtk.Display.<init>(Display.java:31)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.<init>(ApplicationContext.java:81)
at
org.apache.pivot.wtk.DesktopApplicationContext$DesktopDisplayHost.<init>(DesktopApplicationContext.java:107)
at
org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:558)
at
org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:870)
at com.cozmoz.App$.main(Application.scala:25)
at com.cozmoz.App.main(Application.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)

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.

Just want to know if this is a bug/known bug or a feature & will need to be
worked around.
Thanks,
Mustafa.

Mime
View raw message