Using a JAR file on repl.it

 

1. At this URL: http://uzza.us/cs/java/JARFiles.html
right-click to download the JAR file you need. You can download onto a flash drive if you aren't able to download to the Chromebook.

2. In the Files column at the left, click on the "Add Folder" icon. Add a folder named 'jars'.

3. Click on the 'jars' folder, click the 3 vertical dots next to the 'Add Folder' icon, choose 'Upload File' and upload to the 'jars' folder the JAR file you downloaded.

4. Click the 'Add File' icon and name the new file '.replit'. Copy this into .replit:
run = "export CLASSPATH=\".:./jars/*\"; javac -d . Main.java;java Main"
(This makes it so that your program runs when you click the Run button.)

5. You will see that repl.it adds .class files to the 'Files' column. In the screenshot below, you'll see that Main.class and GetThePaper.class have been added to 'Files'.

6. The screenshot below shows the GetThePaper program running.