updated browser example so its working again ;)

This commit is contained in:
James Strachan
2012-07-19 10:23:57 +01:00
parent 9cd231ae60
commit 79904e23da
3 changed files with 16 additions and 8 deletions
+4 -4
View File
@@ -14,9 +14,9 @@ To run the example try:
This should open a browser which then shows some simple HTML which then includes some dynamically generated content.
## Running the sample on Java 7 with JavaFX and KoolApp's browser
## Running the sample on Java 7 with JavaFX and [kool.io](http://kool.io/)'s browser
You can also run the sample as Java code on a JVM using JavaFX (which includes its own webkit rendering engine for HTML / CSS / JS support) using the [KoolApp JavaFX browser](https://github.com/koolapp/koolapp/blob/master/koolapp-javafx/ReadMe.md).
You can also run the sample as Java code on a JVM using JavaFX (which includes its own webkit rendering engine for HTML / CSS / JS support) using the [kool.io JavaFX browser](https://github.com/koolio/kool/blob/master/samples/kool-template-sample/ReadMe.md).
First you need to install [Java 7 update 4](http://www.oracle.com/technetwork/java/javase/overview/index.html) or later which ships with JavaFX.
@@ -35,8 +35,8 @@ which should find the javafx jar.
To run the sample try...
mvn -Pjavafx
mvn test -Pjavafx
Assuming you've Java 7 enabled and JAVA_HOME points to the JRE/JDK for Java 7 or later.
Assuming you've Java 7 enabled and JAVA_HOME points to the JRE/JDK for Java 7 or later which includes JavaFX.
This should popup a JVM process with an embedded webkit based browser running the application; using the compiled bytecode on the JVM rather than JavaScript.
+10 -3
View File
@@ -46,6 +46,13 @@
<goal>js</goal>
</goals>
</execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
@@ -60,8 +67,8 @@
</activation>
<dependencies>
<dependency>
<groupId>org.koolapp</groupId>
<artifactId>koolapp-javafx</artifactId>
<groupId>io.kool</groupId>
<artifactId>kool-javafx</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
@@ -78,7 +85,7 @@
<phase>test</phase>
<configuration>
<target>
<java fork="true" classpathref="maven.test.classpath" classname="org.koolapp.javafx.namespace">
<java fork="true" classpathref="maven.test.classpath" classname="io.kool.javafx.namespace">
<arg value="file://sample-javafx.html"/>
</java>
</target>
@@ -9,6 +9,7 @@
</div>
<script type="text/javascript" src="src/js/jquery.js"></script>
<script type="text/javascript" src="target/js/kotlin-lib-ecma3.js"></script>
<script type="text/javascript" src="target/js/kotlin-lib.js"></script>
<script type="text/javascript" src="target/js/browser-example.js"></script>
@@ -17,7 +18,7 @@
any annotated methods with documentReady
-->
<script type="text/javascript">
$(document).ready(sample.myApp)
$(document).ready(Kotlin.modules['browser-example'].sample.myApp)
</script>
</body>