pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Little change in DesktopApplicationContext, for Startup Properties
Date Tue, 13 Apr 2010 10:44:01 GMT

Hi to all,
I'm doing some experiments with Scala and Pivot, and in standard (Eclipse)
projects all starts th work good.
But I have a problem when these projects are handled by Maven, when I run
the application I get this error (with some additional log info added
temporary in DesktopApplicationContext):

13-apr-2010 12.01.23 - Scala Application Started (main class
Startup property 1: "-target:jvm-1.5"
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:151)
Caused by: java.lang.IllegalArgumentException: Startup property names must
begin with "--".
	at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source)
	at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source)
	at scavot.experiments.scala_use_pivot.HelloJavaApp.main(HelloJavaApp.scala)
	... 6 more

This is something related to maven and scala, ok ... and so my proposal of a
little patch (useful to all, for the 1.5 release !!):
what do you think on make the generated IllegalArgumentException give more
detail to the user, reporting the wrong argument inside the message, like
adding at the end of message " and not <the given argument>".
In any case this could be useful, a lot when Pivot sources are not available
(as currently is using Maven).

After this, to make this type of applications run, what do you think on
wrapping the generation of the  IllegalArgumentException so the application
can report it but discard and continue its execution ?
If not I'll have to extend DesktopApplicationContext to provide this feature
... and also this could makes sense.

Sorry, a last thing on maven, and our ticket PIVOT-383 (Greg has this
someone is working on it ? I've seen it has been moved to the (future)
release 2.1, but why ?
Tell me if I can help in this, if possible also for the 1.5.

If someone is interested I can post the Scala-converted samples (at the
moment only HelloJava and HelloWTKX). Or if the Scala license is compatible
with ours (Apache) maybe I could put in a custom folder out of trunk ...

Tell me what you think.


View this message in context: http://n3.nabble.com/Little-change-in-DesktopApplicationContext-for-Startup-Properties-tp715672p715672.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

View raw message