0

I am trying embed a java applet into my webpage. Unfortunately, I can't put my .class file straight into the server so, I was going to read the .class file from a git repository and pointing to it with the archive attribute in my html code.

This is the html code:

<html>
<body>
<applet code="DodgemApplet.class" width="640" height="480" archive="https://github.com/smithg017/repo.git">
</applet>
</body>
</html>

I am still pretty new to html so can someone show me the right way I should be going to get my java applet embedded into my website? Thanks!

Silimerse
  • 91
  • 1
  • 1
  • 7

1 Answers1

0

Well, there was a hidden property I didn't know about and after much digging I found the property codebase. I put this:

codebase="https://github.com/smithg017/repo/blob/master/"

right after

code = "DodgemApplet.class"

code is simply the name. by default it will look in the same directory as the html file. In my case, in the Desktop folder. If your class file is elsewhere, reference the folder your class file is in under the codebase property.

Silimerse
  • 91
  • 1
  • 1
  • 7