Exporting a Worksheet as an Applet

In this tutorial we show how to take a worksheet and turn it into an applet viewable in a web browser.

So now you have a worksheet that you'd like to share with the world.  Select
File > Export > Dynamic Worksheet as Webpage

Enter a title for your worksheet and click the Advanced tab. 

Consider the various options you have for exporting your worksheet. 

By default, the size of you applet as it will appear on a web page is the size of your worksheet when you chose Export from the menu.  These are the Width and Height dimensions displayed.  You almost certainly don't want your GeoGebra window maximized when you start an export!  Resize your GeoGebra window to the size you want, then start the export.

Check the option at the bottom: "ggb Files & jar Files".

When you click Export, GeoGebra will generate several .jar files, a .ggb file, and an .html file.  Place all these in a folder together, and when you open the .html file your applet will run.

See the .html file here.

If you open your .html file in a text editor, you'll see the code to the right.  This is the part of the .html page that makes the applet run.

On the second line, the command codebase="./" tells the computer to look in the same folder (as the .html file) for the jar files and the ggb file.

On the fourth line, we see which GeoGebra file is being called for the applet.

<applet name="ggbApplet" code="geogebra.GeoGebraApplet" archive="geogebra.jar"
width="432" height="248" MAYSCRIPT>
<param name="filename" value="Tutorial_5.ggb"/>
<param name="java_arguments" value="-Xmx512m" />
<param name="cache_archive" value="geogebra.jar, geogebra_main.jar,
geogebra_gui.jar, geogebra_cas.jar, geogebra_export.jar,
<param name="cache_version" value=",,,,,"
<param name="framePossible" value="false" />
<param name="showResetIcon" value="true" />
<param name="showAnimationButton" value="true" />
	<param name="enableRightClick" value="true" />
<param name="errorDialogsActive" value="true" />
<param name="enableLabelDrags" value="false" />
<param name="showMenuBar" value="false" />
<param name="showToolBar" value="false" />
<param name="showToolBarHelp" value="true" />
<param name="showAlgebraInput" value="false" />
Sorry, the GeoGebra Applet could not be started. Please make sure that
Java 1.4.2 (or later) is installed and active in your browser
(<a href="http://java.sun.com/getjava">Click here to install Java now</a>)
You can make the GeoGebra applet part of a larger page by cutting and pasting this part of the code into another page. 

For example, I've pasted that code into this page that you're reading right now, I changed the codebase parameter to codebase="exported/", and I changed the GeoGebra filename to "exported/Tutorial_5.ggb".  The result is to the right.
Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (Click here to install Java now)

Final thoughts
Back to Home Tutorial Page