Java Applets in Yola

  • 1
  • Question
  • Updated 8 years ago
  • Answered
How do I get java applets to run within html in yola? What is the directory of the file manager? Is there anything extra I have to do to get it to run properly? I want to make my yolasite a game site, for people to play my java games, so I need this information. I know how to put a java applet into a regular html page, but not in yola. I have tried to get it to run by placing the class in the filemanager, and putting the applet code in an html block, but all I get is a blank 'applet not initialized' error. There are no problems with my java code.
Photo of kellboy9


  • 2 Posts
  • 0 Reply Likes
  • frustrated

Posted 8 years ago

  • 1
Photo of Justine


  • 751 Posts
  • 45 Reply Likes
Hi kellboy9,

There are a few things you need to do to run a Java applet in your Yola site. Here are the steps:

1. Upload the .jar file by using the File Manager
2. Add the code provided into an HTML widget and remember to add the text 'resources/' before the file name resources/yourapplet.jar
3. The code should look something like:
<!-- <APPLET code = "Yourclass.class" archive =
"resources/yourapplet.jar" width = "290" height = "150">
<PARAM>any param settings applicable to your applet</PARAM>

where 'yourclass.class' is the name of your applet
where 'yourapplet.jar' is the jar file you've uploaded in the File Manager
Parameter settings are any display settings that you want to define

4. This is an example of a clock java applet where the file uploaded is called wClock.jar:
<APPLET code = "WorldClock.class" archive = "resources/wClock.jar"
width = "290" height = "150">
<PARAM name="background_color" value="175,190,190">
<PARAM name="border_clock_color" value="0,0,130">
<PARAM name="digit_clock_color" value="0,0,0">
<PARAM name="cities_text_color" value="0,0,0">
<PARAM name="cities_background_color" value="175,190,190">
</APPLET> -->

I hope that answers your question! If it doesn't work, perhaps you can paste the code here and we can try work out why.
Photo of kellboy9


  • 2 Posts
  • 0 Reply Likes
What if it is a single class file? No jar yet.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hello kellboy9

This link may contain some helpful information.