How to run your Slick2D game as applet

Monday, March 04, 2013 , , , 18 Comments

In order to run your jar file as applet you need to sign it first or you have to use policy but signing jar file is more practicle than using policy so you will need to learn how to sign your jar file with your own digital sign.

Download lwjgl applet package [Link] which comes with signed jars it also contains example :)

After buiding your game goto 'dist' folder ( i am using netbeans ) and copy your game's jar file and then open it with any archive program (winrar,7zip etc) and add your 'data' folder in it which contains all the images,sounds etc to game's jar file.then sign the jar with this method : Link

Now make one folder named applet and put game and all the libraries your game uses in that folder.Make game.html and put applet code in it and execute. If everything is went well then it will run your game in browser. :)

Sample HTML file :

Just a note, my game requires mysql connector and i needed to sign mysql jar and then add it to the 'al_jars' param of the html applet code then it worked fine.

Some Tips :

1) Check that your game is not using System.Exit() in any ways.

2) Move game's frame-rate code to init method because applet does not call the main() of main class.

3) You can enable java console to view exception stack from
control-panel -> java -> goto advanced tab in 'java console' select 'show console' and press ok.

4) If signing jar is not working then first make a file named java.policy.applet in your applet folder with following code
grant { permission; };
after saving it open cmd and goto applet folder through cmd
and then run following command
appletviewer your-applet.html

Have Fun :D !!


  1. Really it will be helpful for these Visual dot coding.I want to work out this coding for my visual in windows amazing working and it answers come correct. I will refer my friends.
    Selenium Training in Chennai

  2. Wonderful blog. Thanks for sharing..
    The role of software testing is a process which should be complete understanding for the successful implementation, execution and running of a software product and it's basically classified into manual testing and automation testing using software testing tools.

  3. Franchise Opportunities@
    Franchise opportunities in India@
    Franchise Opportunities India@
    Brand Establishment@

  4. Nice post. I was checking constantly this blog and I am impressed! Extremely useful info specially the last part :) I care for such information much. I was seeking this particular information for a very long time..
    Excellent Photoshop Training Institute in Chennai | Best Multimedia Training Institute in Velachery

  5. Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.

    AWS Training in Chennai


  6. I am actually grateful to the holder of this web site who has shared this great post at at this place. hotmail login

  7. Great job.... Awesome list, just starting a blog and this is going to be a massive help. Thank you!
    Excellent Summer Courses for Business Administration in Chennai | Best Vacation Classes in Chennai

  8. Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.
    www hotmail com sign in

  9. Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.
    Multimedia Technical Boot Camp in Chennai | Best Vacation Class in Guindy

  10. Hello, I read your blog occasionally, and I own a similar one, and I was just wondering if you get a lot of spam remarks? If so how do you stop it, any plugin or anything you can advise? I get so much lately it’s driving me insane, so any assistance is very much appreciated.
    Data science Course Training in Chennai |Best Data Science Training Institute in Chennai
    RPA Course Training in Chennai |Best RPA Training Institute in Chennai
    AWS Course Training in Chennai |Best AWS Training Institute in Chennai

  11. Excellent work.
    Nice and informative read

    Thank You

    data science course in indore

  12. Really Thanks For Posting Such a Useful and informative article. oracle training in chennai