2.2. ActiveCode - Other

The ActiveCode Feature also allows you to execute JavaScript, or HTML directly on the client. Other languages like Java are run on a backend server, which means that you must have internet access to run those programs.

2.2.1. Running JavaScript

You can run JavaScript code. The following example is from the Fundamentals of Web Programming ebook at JavaScript1.

2.2.2. Running HTML

You can show a generated HTML document. The following example is from the Fundamentals of Web Programming ebook at HTML1.

2.2.3. Running HTML with JavaScript

You can show a generated HTML document that includes JavaScript. The following example is from the Fundamentals of Web Programming ebook at HTML+JavaScript.

2.2.4. Running Java

You can run Java code as well. It will be sent to a backend server (Jobe) and executed and then the results will be displayed in the browser window.

The following example is from the Java Review ebook. You can see it by clicking the following Java-Vars.

2.2.5. Editing Java

Students can edit Java code and run it again. Run the following code. Next, change the code below to print a countdown from 10 to 1 and run it again.

The example below is from the Java Review ebook. You can see it by clicking on the following link Countdown.

2.2.6. Stepping Through Java Code using the Java Visualizer

You can embed links to Phillip Guo’s Java Visualizer which will allow you to preload the code. To see an example click on the following VisEx.

We hope to embed the Java Visualizer in the ebook in the future in the same way the Python Visualizer is embedded.

2.2.7. Audio Tours of Code

You can have audio tours of any language. See the following link for an example in the Java Review ebook at Java-Audio-Tour. Click on the Audio Tour button.

Next Section - 2.3. Codelens in Python