MUST COMPILE USING JAVA version 8 !!!!!!!!!!!! /usr/lib/jvm/java-8-openjdk-amd64/bin/javac *.java /usr/lib/jvm/java-8-openjdk-amd64/bin/jar /usr/lib/jvm/java-8-openjdk-amd64/bin/java /usr/lib/jvm/java-8-openjdk-amd64/bin/jar cvf mod9_3.jar *.class *.png Instructions.class Mod3.class Mod3State.class PARSEinfo.class MathPow.class Mod3Info.class MyArrows.class STR.class Mod2State.class Mod3Input.class MyPoint.class TheFonts.class Mod3Choice.class Mod3Plot.class NewOutputCanvas2.class TitlePanel.class use THIS: https://em8e.eecs.umich.edu/jsmodules/ulaby_modules.html file:///home/lep/ulaby_stuff/em8e_work_march30_2022/try1/allmods/ulaby_modules.html https://docs.google.com/document/d/1YDz3dLBMtaCMLkjoWpIEnL-z6YYVu0F-Sf-SHyiCrwM/edit ------------------------------------------------------------------- here in try4/ (or another tryx/ subdirectory): copy the jar you want to convert, e.g. mod9_3.jar, to this directory then, type: ../cheerpj_2.2/cheerpjfy.py mod9_3.jar this will create file 'mod9_3.jar.js' create the appropriate html file (use mod3_1.html for a guide) can then test it using browser: from another terminal (go to try4/ directory), type: python3 -m http.server 8080 Now open the browser and enter the following URL: http://127.0.0.1:8080/ch9/mod9_3/mod9_3.html ----------------------------------------------------------------------------- TO test code in java version: go to directory with .class files, and type in terminal: java ----------------------------------------------------------------------------- To compile into .jars: first compile individual .java files: javac then create .jar file, e.g.: jar cvf TicTacToe.jar TicTacToe.class audio images ------------------------------------------------------------------------------ TEST Lee's current modules: file:///home/lep/ulaby_stuff/em8e_work_march30_2022/try1/allmods/ulaby_modules.html this will use the stuff on the website tutorial notes: TIP: There are many different Web servers that you can use, and all of them should work. For a quick test we recommand: Python2: python2 -m SimpleHTTPServer 8080 Python3: python3 -m http.server 8080 NPM (http-server): http-server -p 8080 To run TextDemo.jar in the browser using CheerpJ, do the following cd ~/cheerpj_tutorial/ python3 -m http.server 8080 Now open your favourite browser and enter the following URL http://127.0.0.1:8080/cheerpj_tutorial.html. You will see the CheerpJ spinner during a brief loading phase. Then the Java window will appear and it will look identical to the native version.