[SOLVED] Java applet issue

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Moderators General, Prelates

Henrik
Posts: 2
Joined: Mon May 30, 2011 10:32 am UTC

[SOLVED] Java applet issue

Postby Henrik » Mon May 30, 2011 10:50 am UTC

Hello!

I have made a java game for a school project and finished it. Recently I decided to turn it into an applet so I could run it on my website, that conversion worked well. I can run the game perfectly fine compiled in eclipse through the eclipse applet viewer but when I try to run it through an html file I get some issues. I can see the graphics and there is music playing in the background, but the keyboard doesn't take any input.

At first I thought I would be able to fix this easily, that it was just some focus issue or something. But after searching the web and trying several solutions recommended to others the problem remained.

The html file is placed in the "bin" folder of the eclipse project, containing all the class files, images and sounds. This is what it looks like:

Code: Select all

<html>
<head>
<title>Henkout</title>
</head>
<body style="background-color:Grey">
<applet code=Henkout.class width=650 height=750>
   Your browser is not Java enabled.
</applet>
</body>
</html>


I don't know if this is relevant, but I run the latest ubuntu and firefox release.

If anything is unclear or missing, I apologise in advance.

Any help is greatly appreciated, thanks!
Last edited by Henrik on Tue May 31, 2011 8:52 am UTC, edited 1 time in total.

User avatar
diabolo
Posts: 72
Joined: Fri Aug 08, 2008 4:17 pm UTC
Location: france

Re: Java applet issue

Postby diabolo » Mon May 30, 2011 1:11 pm UTC

Henrik wrote:I don't know if this is relevant, but I run the latest ubuntu and firefox release.

I've seen some applets that failed to work with the IcedTea Java plugin but worked fine with the sun-java stuff (no idea why, though). Does your Eclipse run with a sun-java JDK and your Firefox with an OpenJDK?

Henrik
Posts: 2
Joined: Mon May 30, 2011 10:32 am UTC

Re: Java applet issue

Postby Henrik » Tue May 31, 2011 8:21 am UTC

diabolo wrote:
Henrik wrote:I don't know if this is relevant, but I run the latest ubuntu and firefox release.

I've seen some applets that failed to work with the IcedTea Java plugin but worked fine with the sun-java stuff (no idea why, though). Does your Eclipse run with a sun-java JDK and your Firefox with an OpenJDK?


Sorry for being so slow at answering, I had quite a busy day yesterday. You helped me a lot, I tried running it on another computer and it worked just fine... I can't believe I spent hours trying to fix this, oh well. Thanks a bunch!


Return to “The Help Desk”

Who is online

Users browsing this forum: No registered users and 4 guests