-
Notifications
You must be signed in to change notification settings - Fork 32
Tutorial ~ Deployment
Our example continues with the HTML file src/main/webapp/index.html, which will load the Jangaroo application and run its main class HelloWorld.
Each HTML page using compiled Jangaroo code has to include a Jangaroo application script generated by the Maven build process. Then, you can start your ActionScript main class with a single JavaScript statement:
<html>
<head>
<title>Hello World - Jangaroo</title>
</head>
<body>
<script type="text/javascript"
src="joo/jangaroo-application.js"></script>
<script type="text/javascript">
joo.classLoader.run("HelloWorld");
</script>
</body>
</html>
Now, again on the command line, enter
> mvn package
Note that the source file index.html will be copied to target/hello- world-0.1.0-SNAPSHOT during the build process. Thus, in your browser, navigate to
file:///_PROJECT_HOME_/target/hello-world-0.1.0-SNAPSHOT/index.html
or open the file using the corresponding browser menu, or simply use the Windows command line again:
> start target/hello-world-0.1.0-SNAPSHOT/index.html
Note: Do not try to open the HTML file at its source location, but only in the target folder, or it will not find any script files!
Next, let's look at how a Jangaroo application works in the browser and how we can debug it.
Overview | Applications | Tutorial | Project | Documentation | Download | Blog | FAQ | Imprint