Skip to content

Commit 0343ef8

Browse files
committed
embedded demo not working on platforms other than Windows.
1 parent ab09d06 commit 0343ef8

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

pom.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2-
<modelVersion>4.0.0</modelVersion>
3-
<groupId>co.openfin</groupId>
4-
<artifactId>openfin-java-example</artifactId>
5-
<version>1.0-SNAPSHOT</version>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>co.openfin</groupId>
6+
<artifactId>openfin-java-example</artifactId>
7+
<version>1.0-SNAPSHOT</version>
68
<properties>
79
<user.name>[email protected]</user.name>
810
<maven.compiler.release>11</maven.compiler.release>

src/main/java/com/openfin/desktop/demo/EmbeddedWindowDemo.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.openfin.desktop.bean.Identity;
2525
import com.openfin.desktop.bean.RuntimeConfig;
2626
import com.openfin.desktop.bean.WindowOptions;
27+
import com.sun.jna.Platform;
2728

2829
public class EmbeddedWindowDemo implements FinRuntimeConnectionListener {
2930

@@ -136,8 +137,13 @@ public void onClose(String reason) {
136137
}
137138

138139
public static void main(String[] args) {
139-
SwingUtilities.invokeLater(()->{
140-
new EmbeddedWindowDemo();
141-
});
140+
if (Platform.isWindows()) {
141+
SwingUtilities.invokeLater(()->{
142+
new EmbeddedWindowDemo();
143+
});
144+
}
145+
else {
146+
System.out.println("OpenFin Embedded NOT supported on this platform.");
147+
}
142148
}
143149
}

0 commit comments

Comments
 (0)