You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Jacques Granduel <jg...@gmail.com> on 2010/10/28 07:51:46 UTC

launching Pivot programmatically

Hi all,

this is a very basic question ! I would like to know how I can launch the
equivalent of the command line "hello world" tutorial:
public static void main(String[] args) {
  DesktopApplicationContext.main(HelloJava.class, args);
}

Thanks a lot.

Best regards,
jqg

Re: launching Pivot programmatically

Posted by Greg Brown <gk...@mac.com>.
By the way, you can easily write your own implementation of the Application interface if ScriptApplication does not suit your needs. In fact, most Pivot applications are coded this way.
G

On Nov 22, 2010, at 8:05 AM, Greg Brown wrote:

> Sorry, didn't read the entire message. Passing the script source as a string has obvious limitations, as you have discovered. Processing from standard in might be a good enhancement. At one point we actually did support local files but that code was removed. There was some issue with it, though I don't remember exactly what it was at the moment.
> 
>> On Nov 22, 2010, at 7:59 AM, Jacques Granduel wrote:
>> 
>>> Thanks for your remark and I had indeed seen I could use "Pivot scripting", but I want to dynamically shape my view from the outside, according to some input.
>>> 
>>> What could be the best way to send this object (as a String or ByteArrayInputStream ?) to BXMLSerializer as the actual API seems to be 
>>> 
>>> java.lang.Object readObject(java.net.URL)
>>> java.lang.Object readObject(java.io.InputStream)
>>> java.lang.Object readObject(java.lang.Class,java.lang.String,boolean)
>>> java.lang.Object readObject(java.lang.Class,java.lang.String)
>>> java.lang.Object readObject(java.net.URL,org.apache.pivot.util.Resources).
>>> 
>>> I modified the ScriptApplication.java for allowing path/to/file.bxml to be accepted beside classpath resource using File(...).toURI().toURL().
>>> 
>>> As for the String, I wanted the equivalent, say (example in JS/Rhino)
>>> JS>var win = <Window title="Hello BXML!" maximized="true"
>>>     xmlns:bxml="http://pivot.apache.org/bxml"
>>>     xmlns="org.apache.pivot.wtk">
>>>     <Label text="Hello BXML!"
>>>         styles="{font:'Arial bold 24', color:'#ff0000',
>>>             horizontalAlignment:'center', verticalAlignment:'center'}"/>
>>> </Window>
>>> JS>ScriptApplication.main(["--src=" + win]);
>>> The latest crashed because DesktopApplicationContext.java splits args this way:
>>> if (arg.startsWith("--")) {
>>>                 String[] property = arg.split("=");
>>> and my bxml snippet is full of "=" due to the attribute values!
>>> So, as a quick workaround, I kept the first element of the property table, and joined back the rest.
>>> 
>>> ScriptApplication.java:
>>> String src = properties.get(SRC_KEY);
>>> InputStream ins = new ByteArrayInputStream(src.getBytes());
>>> BXMLSerializer bxmlSerializer = new BXMLSerializer();
>>> window = (Window)bxmlSerializer.readObject(ins);
>>> window.open(display);
>>> 
>>> This way it seems to work nicely.
>>> 
>>> So... may I suggest adding loading bxml from File and String also?
>>> 
>>> Thanks once again for your help,
>>> jqg
>>> 
>>> 
>>> 2010/11/22 Greg Brown <gk...@mac.com>
>>> > So my reasons for doing that kind of stuff, well, er, curiosity? learning and playing Pivot from a tiny environment, manipulating the bxml xml with E4X and dynamically injecting js code in the GUI ?... I have to learn how to directly pass a bxml String or E4X/XML object to ScriptApplication and to manipulate objects from the rhino shell, as it's doable in Swing.
>>> 
>>> OK. Just in case you were not aware, BXML allows you to embed script code directly within your markup, and will invoke the appropriate script engine as needed. So don't necessarily need to launch Pivot from within Rhino to use Rhino.
>>> 
>>> G
>>> 
>>> 
>> 
> 


Re: launching Pivot programmatically

Posted by Greg Brown <gk...@mac.com>.
Sorry, didn't read the entire message. Passing the script source as a string has obvious limitations, as you have discovered. Processing from standard in might be a good enhancement. At one point we actually did support local files but that code was removed. There was some issue with it, though I don't remember exactly what it was at the moment.

> On Nov 22, 2010, at 7:59 AM, Jacques Granduel wrote:
> 
>> Thanks for your remark and I had indeed seen I could use "Pivot scripting", but I want to dynamically shape my view from the outside, according to some input.
>> 
>> What could be the best way to send this object (as a String or ByteArrayInputStream ?) to BXMLSerializer as the actual API seems to be 
>> 
>> java.lang.Object readObject(java.net.URL)
>> java.lang.Object readObject(java.io.InputStream)
>> java.lang.Object readObject(java.lang.Class,java.lang.String,boolean)
>> java.lang.Object readObject(java.lang.Class,java.lang.String)
>> java.lang.Object readObject(java.net.URL,org.apache.pivot.util.Resources).
>> 
>> I modified the ScriptApplication.java for allowing path/to/file.bxml to be accepted beside classpath resource using File(...).toURI().toURL().
>> 
>> As for the String, I wanted the equivalent, say (example in JS/Rhino)
>> JS>var win = <Window title="Hello BXML!" maximized="true"
>>     xmlns:bxml="http://pivot.apache.org/bxml"
>>     xmlns="org.apache.pivot.wtk">
>>     <Label text="Hello BXML!"
>>         styles="{font:'Arial bold 24', color:'#ff0000',
>>             horizontalAlignment:'center', verticalAlignment:'center'}"/>
>> </Window>
>> JS>ScriptApplication.main(["--src=" + win]);
>> The latest crashed because DesktopApplicationContext.java splits args this way:
>> if (arg.startsWith("--")) {
>>                 String[] property = arg.split("=");
>> and my bxml snippet is full of "=" due to the attribute values!
>> So, as a quick workaround, I kept the first element of the property table, and joined back the rest.
>> 
>> ScriptApplication.java:
>> String src = properties.get(SRC_KEY);
>> InputStream ins = new ByteArrayInputStream(src.getBytes());
>> BXMLSerializer bxmlSerializer = new BXMLSerializer();
>> window = (Window)bxmlSerializer.readObject(ins);
>> window.open(display);
>> 
>> This way it seems to work nicely.
>> 
>> So... may I suggest adding loading bxml from File and String also?
>> 
>> Thanks once again for your help,
>> jqg
>> 
>> 
>> 2010/11/22 Greg Brown <gk...@mac.com>
>> > So my reasons for doing that kind of stuff, well, er, curiosity? learning and playing Pivot from a tiny environment, manipulating the bxml xml with E4X and dynamically injecting js code in the GUI ?... I have to learn how to directly pass a bxml String or E4X/XML object to ScriptApplication and to manipulate objects from the rhino shell, as it's doable in Swing.
>> 
>> OK. Just in case you were not aware, BXML allows you to embed script code directly within your markup, and will invoke the appropriate script engine as needed. So don't necessarily need to launch Pivot from within Rhino to use Rhino.
>> 
>> G
>> 
>> 
> 


Re: launching Pivot programmatically

Posted by Greg Brown <gk...@mac.com>.
Why not pass the name of a file as an argument instead of the entire string? Or maybe you can read from standard in?

On Nov 22, 2010, at 7:59 AM, Jacques Granduel wrote:

> Thanks for your remark and I had indeed seen I could use "Pivot scripting", but I want to dynamically shape my view from the outside, according to some input.
> 
> What could be the best way to send this object (as a String or ByteArrayInputStream ?) to BXMLSerializer as the actual API seems to be 
> 
> java.lang.Object readObject(java.net.URL)
> java.lang.Object readObject(java.io.InputStream)
> java.lang.Object readObject(java.lang.Class,java.lang.String,boolean)
> java.lang.Object readObject(java.lang.Class,java.lang.String)
> java.lang.Object readObject(java.net.URL,org.apache.pivot.util.Resources).
> 
> I modified the ScriptApplication.java for allowing path/to/file.bxml to be accepted beside classpath resource using File(...).toURI().toURL().
> 
> As for the String, I wanted the equivalent, say (example in JS/Rhino)
> JS>var win = <Window title="Hello BXML!" maximized="true"
>     xmlns:bxml="http://pivot.apache.org/bxml"
>     xmlns="org.apache.pivot.wtk">
>     <Label text="Hello BXML!"
>         styles="{font:'Arial bold 24', color:'#ff0000',
>             horizontalAlignment:'center', verticalAlignment:'center'}"/>
> </Window>
> JS>ScriptApplication.main(["--src=" + win]);
> The latest crashed because DesktopApplicationContext.java splits args this way:
> if (arg.startsWith("--")) {
>                 String[] property = arg.split("=");
> and my bxml snippet is full of "=" due to the attribute values!
> So, as a quick workaround, I kept the first element of the property table, and joined back the rest.
> 
> ScriptApplication.java:
> String src = properties.get(SRC_KEY);
> InputStream ins = new ByteArrayInputStream(src.getBytes());
> BXMLSerializer bxmlSerializer = new BXMLSerializer();
> window = (Window)bxmlSerializer.readObject(ins);
> window.open(display);
> 
> This way it seems to work nicely.
> 
> So... may I suggest adding loading bxml from File and String also?
> 
> Thanks once again for your help,
> jqg
> 
> 
> 2010/11/22 Greg Brown <gk...@mac.com>
> > So my reasons for doing that kind of stuff, well, er, curiosity? learning and playing Pivot from a tiny environment, manipulating the bxml xml with E4X and dynamically injecting js code in the GUI ?... I have to learn how to directly pass a bxml String or E4X/XML object to ScriptApplication and to manipulate objects from the rhino shell, as it's doable in Swing.
> 
> OK. Just in case you were not aware, BXML allows you to embed script code directly within your markup, and will invoke the appropriate script engine as needed. So don't necessarily need to launch Pivot from within Rhino to use Rhino.
> 
> G
> 
> 


Re: launching Pivot programmatically

Posted by Jacques Granduel <jg...@gmail.com>.
Thanks for your remark and I had indeed seen I could use "Pivot scripting",
but I want to dynamically shape my view from the outside, according to some
input.

What could be the best way to send this object (as a String or
ByteArrayInputStream ?) to BXMLSerializer as the actual API seems to be

java.lang.Object readObject(java.net.URL)
java.lang.Object readObject(java.io.InputStream)
java.lang.Object readObject(java.lang.Class,java.lang.String,boolean)
java.lang.Object readObject(java.lang.Class,java.lang.String)
java.lang.Object readObject(java.net.URL,org.apache.pivot.util.Resources).

I modified the ScriptApplication.java for allowing path/to/file.bxml to be
accepted beside classpath resource using File(...).toURI().toURL().

As for the String, I wanted the equivalent, say (example in JS/Rhino)
JS>var win = <Window title="Hello BXML!" maximized="true"
    xmlns:bxml="http://pivot.apache.org/bxml"
    xmlns="org.apache.pivot.wtk">
    <Label text="Hello BXML!"
        styles="{font:'Arial bold 24', color:'#ff0000',
            horizontalAlignment:'center', verticalAlignment:'center'}"/>
</Window>
JS>ScriptApplication.main(["--src=" + win]);
The latest crashed because DesktopApplicationContext.java splits args this
way:
if (arg.startsWith("--")) {
                String[] property = arg.split("=");
and my bxml snippet is full of "=" due to the attribute values!
So, as a quick workaround, I kept the first element of the property table,
and joined back the rest.

ScriptApplication.java:
String src = properties.get(SRC_KEY);
InputStream ins = new ByteArrayInputStream(src.getBytes());
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window)bxmlSerializer.readObject(ins);
window.open(display);

This way it seems to work nicely.

So... may I suggest adding loading bxml from File and String also?

Thanks once again for your help,
jqg


2010/11/22 Greg Brown <gk...@mac.com>

> > So my reasons for doing that kind of stuff, well, er, curiosity? learning
> and playing Pivot from a tiny environment, manipulating the bxml xml with
> E4X and dynamically injecting js code in the GUI ?... I have to learn how to
> directly pass a bxml String or E4X/XML object to ScriptApplication and to
> manipulate objects from the rhino shell, as it's doable in Swing.
>
> OK. Just in case you were not aware, BXML allows you to embed script code
> directly within your markup, and will invoke the appropriate script engine
> as needed. So don't necessarily need to launch Pivot from within Rhino to
> use Rhino.
>
> G
>
>

Re: launching Pivot programmatically

Posted by Greg Brown <gk...@mac.com>.
> So my reasons for doing that kind of stuff, well, er, curiosity? learning and playing Pivot from a tiny environment, manipulating the bxml xml with E4X and dynamically injecting js code in the GUI ?... I have to learn how to directly pass a bxml String or E4X/XML object to ScriptApplication and to manipulate objects from the rhino shell, as it's doable in Swing.

OK. Just in case you were not aware, BXML allows you to embed script code directly within your markup, and will invoke the appropriate script engine as needed. So don't necessarily need to launch Pivot from within Rhino to use Rhino.

G


Re: launching Pivot programmatically

Posted by Jacques Granduel <jg...@gmail.com>.
Hi,

2010/11/21 Greg Brown <gk...@mac.com>

> Is the test.bxml on your classpath? I'm not sure how the classpath is
> managed in Rhino, so I don't have any specific suggestions.
>
> I am curious to know why you want to launch your app via the Rhino shell,
> though. Any reason you can't simply launch it via
> DesktopApplicationContext#main()?
>


thank you for your reply.

At last, I checked ScriptApplication source,

I changed the URL object to be created from a path...
from:
URL location = classLoader.getResource(src.substring(1));
to:
String path = properties.get(SRC_KEY);
URL location = new File(src).toURI().toURL();

and that was it! I can now see my first Pivot Hello world!!

So my reasons for doing that kind of stuff, well, er, curiosity? learning
and playing Pivot from a tiny environment, manipulating the bxml xml with
E4X and dynamically injecting js code in the GUI ?... I have to learn how to
directly pass a bxml String or E4X/XML object to ScriptApplication and to
manipulate objects from the rhino shell, as it's doable in Swing.

Thanks again,
jqg

Re: launching Pivot programmatically

Posted by Greg Brown <gk...@mac.com>.
Is the test.bxml on your classpath? I'm not sure how the classpath is managed in Rhino, so I don't have any specific suggestions.

I am curious to know why you want to launch your app via the Rhino shell, though. Any reason you can't simply launch it via DesktopApplicationContext#main()?

G

On Nov 21, 2010, at 4:36 AM, Jacques Granduel wrote:

> Hi, 
> 
> I'm sorry for coming back on this old thread about learning how to launch a Pivot application from a shell (Rhino shell in this case). I've made a big step forward trying bxml+ScriptApplication, but it's still not enough! What am I missing??
> 
> I've saved  this file from the 2.0 tutorial:
> <Window title="Hello JavaScript!" maximized="true"
>     xmlns:bxml="http://pivot.apache.org/bxml"
>     xmlns="org.apache.pivot.wtk">
>     <windowStateListeners>
>         importPackage(org.apache.pivot.wtk);
>  
>         function windowOpened(window) {
>             var label = new Label();
>             label.setText("Hello JavaScript!");
>             label.getStyles().put("font", "Arial BOLD 24");
>             label.getStyles().put("color", "#ff0000");
>             label.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
>             label.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
>  
>             window.setContent(label);
>         }
>     </windowStateListeners>
> </Window>
> into a file test.bxml.
> I use from Java, ScriptApplication.main(new String[]{"--src=path/to/test.bxml"}); or from Rhino ScriptApplication.main(["--src="path/to/test.bxml"])
> but in both cases, I get an IllegalArgumentException although the text.bxml is found by Java.
> 
> java.lang.IllegalArgumentException: Cannot find source file "test.bxml".
>         at org.apache.pivot.wtk.ScriptApplication.startup(ScriptApplication.java:47)
>         at org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:594)
>         at org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1457)
>         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> 
> Thanks again, 
> regards
> jqg
> 


Re: launching Pivot programmatically

Posted by Jacques Granduel <jg...@gmail.com>.
Hi,

I'm sorry for coming back on this old thread about learning how to launch a
Pivot application from a shell (Rhino shell in this case). I've made a big
step forward trying bxml+ScriptApplication, but it's still not enough! What
am I missing??

I've saved  this file from the 2.0 tutorial:
<Window title="Hello JavaScript!" maximized="true"
    xmlns:bxml="http://pivot.apache.org/bxml"
    xmlns="org.apache.pivot.wtk">
    <windowStateListeners>
        importPackage(org.apache.pivot.wtk);

        function windowOpened(window) {
            var label = new Label();
            label.setText("Hello JavaScript!");
            label.getStyles().put("font", "Arial BOLD 24");
            label.getStyles().put("color", "#ff0000");
            label.getStyles().put("horizontalAlignment",
HorizontalAlignment.CENTER);
            label.getStyles().put("verticalAlignment",
VerticalAlignment.CENTER);

            window.setContent(label);
        }
    </windowStateListeners>
</Window>
into a file test.bxml.
I use from Java, ScriptApplication.main(new
String[]{"--src=path/to/test.bxml"}); or from Rhino
ScriptApplication.main(["--src="path/to/test.bxml"])
but in both cases, I get an IllegalArgumentException although the text.bxml
is found by Java.

java.lang.IllegalArgumentException: Cannot find source file "test.bxml".
        at
org.apache.pivot.wtk.ScriptApplication.startup(ScriptApplication.java:47)
        at
org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:594)
        at
org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1457)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Thanks again,
regards
jqg

Re: launching Pivot programmatically

Posted by Greg Brown <gk...@mac.com>.
Your response was good. I was just trying to provide some additional information.
G

On Oct 28, 2010, at 9:19 AM, Jérôme Serré wrote:

> Sorry,
>  
> I 'had not understood the question
>  
> Jérôme
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : jeudi 28 octobre 2010 13:53
> À : user@pivot.apache.org
> Objet : Re: launching Pivot programmatically
>  
> If you are using Pivot 2.0, you may also find these examples helpful:
>  
>   http://svn.apache.org/repos/asf/pivot/trunk/examples/src/org/apache/pivot/examples/scripting/
>  
> The JavaScript (i.e. Rhino) and Groovy examples are most easily launched via the Eclipse launcher plugin, available here:
>  
>   http://cwiki.apache.org/confluence/download/attachments/108483/org.apache.pivot.eclipse_2.0.0.jar
>  
> Just right-click on groovy_window.bxml or javascript_window.bxml and select Run As > Pivot Script Application.
>  
> G
>  


RE: launching Pivot programmatically

Posted by Jérôme Serré <je...@gmail.com>.
Sorry,

 

I 'had not understood the question

 

Jérôme

De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : jeudi 28 octobre 2010 13:53
À : user@pivot.apache.org
Objet : Re: launching Pivot programmatically

 

If you are using Pivot 2.0, you may also find these examples helpful:

 

 
http://svn.apache.org/repos/asf/pivot/trunk/examples/src/org/apache/pivot/ex
amples/scripting/

 

The JavaScript (i.e. Rhino) and Groovy examples are most easily launched via
the Eclipse launcher plugin, available here:

 

 
http://cwiki.apache.org/confluence/download/attachments/108483/org.apache.pi
vot.eclipse_2.0.0.jar

 

Just right-click on groovy_window.bxml or javascript_window.bxml and select
Run As > Pivot Script Application.

 

G

 


Re: launching Pivot programmatically

Posted by Greg Brown <gk...@mac.com>.
If you are using Pivot 2.0, you may also find these examples helpful:

  http://svn.apache.org/repos/asf/pivot/trunk/examples/src/org/apache/pivot/examples/scripting/

The JavaScript (i.e. Rhino) and Groovy examples are most easily launched via the Eclipse launcher plugin, available here:

  http://cwiki.apache.org/confluence/download/attachments/108483/org.apache.pivot.eclipse_2.0.0.jar

Just right-click on groovy_window.bxml or javascript_window.bxml and select Run As > Pivot Script Application.

G


RE: launching Pivot programmatically

Posted by Jérôme Serré <je...@gmail.com>.
In the tutorial :

http://pivot.apache.org/tutorials/hello-world.html

 

 

The same application can be run from the command line using the following
syntax (minus the line breaks) on UNIX-based systems: 

java -cp pivot-core-[version].jar:pivot-wtk-[version].jar:
pivot-wtk-terra-[version].jar:pivot-tutorials-[version].jar
org.apache.pivot.wtk.DesktopApplicationContext
org.apache.pivot.tutorials.HelloJava 

and the following on Windows systems: 

java -cp pivot-core-[version].jar;pivot-wtk-[version].jar;
pivot-wtk-terra-[version].jar;pivot-tutorials-[version].jar
org.apache.pivot.wtk.DesktopApplicationContext
org.apache.pivot.tutorials.HelloJava 

 

 

De : Jacques Granduel [mailto:jgranduel@gmail.com] 
Envoyé : jeudi 28 octobre 2010 12:39
À : user@pivot.apache.org
Objet : Re: launching Pivot programmatically

 

Thanks... but I've searched in it with no success. I would like something
like

new JFrame().visible = true in Swing for trying from a Groovy/Rhino
Console...

 

Maybe a pointer?

regards

 

 

2010/10/28 Jérôme Serré <je...@gmail.com>

Hello,

 

I think you should read the tutorial first :
http://pivot.apache.org/tutorials/

 

Best regards

Jérôme

 

De : Jacques Granduel [mailto:jgranduel@gmail.com] 
Envoyé : jeudi 28 octobre 2010 07:52
À : user@pivot.apache.org
Objet : launching Pivot programmatically

 

Hi all, 

 

this is a very basic question ! I would like to know how I can launch the
equivalent of the command line "hello world" tutorial:

public static void main(String[] args) {

  DesktopApplicationContext.main(HelloJava.class, args);

}

 

Thanks a lot.

 

Best regards, 

jqg

 


Re: launching Pivot programmatically

Posted by Jacques Granduel <jg...@gmail.com>.
Thanks... but I've searched in it with no success. I would like something
like
new JFrame().visible = true in Swing for trying from a Groovy/Rhino
Console...

Maybe a pointer?
regards


2010/10/28 Jérôme Serré <je...@gmail.com>

>  Hello,
>
>
>
> I think you should read the tutorial first :
> http://pivot.apache.org/tutorials/
>
>
>
> Best regards
>
> Jérôme
>
>
>
> *De :* Jacques Granduel [mailto:jgranduel@gmail.com]
> *Envoyé :* jeudi 28 octobre 2010 07:52
> *À :* user@pivot.apache.org
> *Objet :* launching Pivot programmatically
>
>
>
> Hi all,
>
>
>
> this is a very basic question ! I would like to know how I can launch the
> equivalent of the command line "hello world" tutorial:
>
> public static void main(String[] args) {
>
>   DesktopApplicationContext.main(HelloJava.class, args);
>
> }
>
>
>
> Thanks a lot.
>
>
>
> Best regards,
>
> jqg
>

RE: launching Pivot programmatically

Posted by Jérôme Serré <je...@gmail.com>.
Hello,

 

I think you should read the tutorial first :
http://pivot.apache.org/tutorials/

 

Best regards

Jérôme

 

De : Jacques Granduel [mailto:jgranduel@gmail.com] 
Envoyé : jeudi 28 octobre 2010 07:52
À : user@pivot.apache.org
Objet : launching Pivot programmatically

 

Hi all, 

 

this is a very basic question ! I would like to know how I can launch the
equivalent of the command line "hello world" tutorial:

public static void main(String[] args) {

  DesktopApplicationContext.main(HelloJava.class, args);

}

 

Thanks a lot.

 

Best regards, 

jqg