Wow that was a very easy fix! This did it:
<applet codebase="https://example.com/wp-content/uploads/" code="JavaMain.class" height="200" width="200"></applet>
I knew it was something simple, I just had to specify the codebase field. If anyone else has this problem, the above solution should fix it.