GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - daveagp/java_visualize: Visualization for Java, using the Online Python Tutor frontend

BranchesTags
Open more actions menu

Latest commit

 

History

156 Commits
156 Commits

Folders and files

NameName
Last commit message
Last commit date
CodeMirror @ 1dc82bc
CodeMirror @ 1dc82bc
 
 
OnlinePythonTutor @ 536436b
OnlinePythonTutor @ 536436b
 
 
embed
embed
 
 
example-code
example-code
 
 
img
img
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.htaccess
.htaccess
 
 
LICENSE
LICENSE
 
 
README
README
 
 
TODO
TODO
 
 
config.js.php
config.js.php
 
 
cpp_visualizer.txt
cpp_visualizer.txt
 
 
iframe-embed.html
iframe-embed.html
 
 
index.html
index.html
 
 
java_safe_ram_maketrace.php
java_safe_ram_maketrace.php
 
 
jv-config.example.json
jv-config.example.json
 
 
jv-frontend.js
jv-frontend.js
 
 
pytutor-customizations.css
pytutor-customizations.css
 
 
pytutor-customizations.js
pytutor-customizations.js
 
 

Repository files navigation

java_visualize: visualization for java
David Pritchard ([email protected]), created May 2013

This is the frontend for a Java visualizer. It is based on "Online Python Tutor",
a Python visualizer by Philip Guo. Try it at these mirrors (as of time of writing): 

      http://cscircles.cemc.uwaterloo.ca/java_visualize/ (Java 8)
      http://www.cs.princeton.edu/~cos126/java_visualize/ (Java 7)

The Online Python Tutor repo contains both a frontend and backend.
For Java wre readapt the frontend (so this repo contains OnlinePythonTutor
as a subrepo) and replace the backend (it is in the java_jail repo mentioned
below, since it runs in a sandbox).

INSTALLATION

Install these on your server first:
 https://github.com/cemc/safeexec
 https://github.com/daveagp/java_jail 
This requires root access. See the instructions therein for details. It is best to
install these in locations that are not served to users by your web server.

Next, in some folder accessible to your web server, run

    git clone --recursive https://github.com/daveagp/java_visualize

It's recursive because it includes two submodules. Because of this, 
to update, use the pair of commands
    git pull; git submodule update

At this point, visiting
 http://your.website/url/to/java_visualize/
should give you a beautiful (but non-working) frontend, and
 http://your.website/url/to/java_visualize/java_safe_ram_maketrace.php
should give you a "Couldn't find jv-config.json" error.

Next, copy jv-config.example.json to jv-config.json. Now visiting
 http://your.website/url/to/java_visualize/java_safe_ram_maketrace.php
should give you a "http mangling" error.

Finally, edit jv-config.json to indicate where you installed safeexec 
and java_jail. (Just those first two entries need to be changed right now.)

Now, try the visualizer out!

THE "C++ VISUALIZER"
See cpp_visualizer.txt.

FAQ
 -- click on "Click for FAQ" on the visualizer page

MORE INFO
 -- index.html is a modified version of visualize.html 
 -- jv-frontend.js is a modified version of opt-frontend.js
 -- java_safe_ram_maketrace.php connects the frontend to the backend
 -- config.* is used for configuration stuff specific to your server
 -- pytutor-customizations.{js,css} overrides some behaviour of OPT
 -- example-code is a directory full of example Java files to visualize

Note that in the entire frontend, only the two .php files are
written in a server-side language. Everything else we use is static,
although OnlinePythonTutor has some server-side files that this Java
version does not use.

If you use a database, you'll be putting a DB password in jv-config.json.
Please check that
 http://your.website/url/to/java_visualize/jv-config.json
is inaccessible; .htaccess tries to do this, but you should confirm it works.

====

The modified files (index.html, jv-frontend.js) retain the MIT license 
under which they were published in the OnlinePythonTutor repo. 

The other files are released under
the GNU Affero General Public License, versions 3 or later. See LICENSE
or visit: http://www.gnu.org/licenses/agpl.html

About

Visualization for Java, using the Online Python Tutor frontend

Resources

Readme
AGPL-3.0 license
Activity

Stars

74 stars

Watchers

7 watching

Forks

25 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.