Skip to content

Commit 13f9ec9

Browse files
author
Wenjun Che
committed
ADAP-37: create examples for WebStart
1 parent dcb8367 commit 13f9ec9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,26 @@ Source code for the example is located in /src/main/java/com/openfin/desktop/dem
105105

106106
3. dockToStartupApp and undockFromStartupApp show to dock and undock 2 windows.
107107

108+
## Source Code Review for JNLP Example
108109

110+
Source code for the example is located in /src/main/java/com/openfin/desktop/demo/JNLPExample.java. The followings overview of how it communicates with OpenFin Runtime with API calls supported by the Java adapter:
111+
112+
1. Create connection object:
113+
114+
this.desktopConnection = new DesktopConnection("WebStartExample");
115+
116+
This code just creates an instance and it does not try to connect to runtime.
117+
118+
2. Launch and connect to OpenFin runtime:
119+
120+
desktopConnection.connectToVersion("stable", listener, 100000);
121+
122+
listener is an instance of DesktopStateListener which provides callback on status of connections to runtime. connectToVersion connects to "stable" version of Runtime. If "stable" version is not running, this method will try to start it.
123+
124+
3. Once the Runtime is running, launchHTML5App method is called to start Hello OpenFin demo app.
125+
126+
4. To run the demo, please import webstart/OpenFinSigner.csr into Java Webstart as Signer CA first, and then load
127+
[Demo JNLP](http://openfin.github.io/java-example/webstart/JNLPExample.jnlp) to start the demo.
109128

110129
## More Info
111130

0 commit comments

Comments
 (0)