1

I have implemented a Java Applet. I have exported the jar. I signed the jar. And it works if I put it on my server and use it with HTML. But only in Firefox.

Here is the HTML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
 PUBLIC "//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Upload Test</title>
</head>
<body>
 <object archive="applet.jar" classid="java:uploader/FileUpload.class"
 codetype="application/java-vm" width="800" height="600"> </object>
</body>
</html>

I also tried it with this:

<SCRIPT type="text/javascript">
if(browser.value.getIndex("chrome") {
 chrome.browser.enableFeature(JApplet)
});
</SCRIPT>

But still Firefox only. I would really like for this to work in Chrome & IE9. But these two only leave a space where the Applet should be. I can even highlight it.

Are there things I have to add in my xhtml? Or maybe something in the Applet?

I found enough online about why Applets might not work, but nothing about why Firefox only.

Andrew Thompson
169k42 gold badges224 silver badges441 bronze badges
asked Feb 12, 2013 at 17:08
4
  • 1
    Are you seeing any errors in Chrome/IE9 debug tools? Commented Feb 12, 2013 at 17:14
  • In Chrome/IE is there a placeholder (ie white box) where the applet should be or just nothing? Commented Feb 12, 2013 at 18:56
  • There is a Placeholder, yes. I read that Chrome is 32bit and Java7 is 64bit, which might lead to problems? Commented Feb 12, 2013 at 18:57
  • 1
    Use deployJava.js to write the applet element compatible with each browser. Commented Feb 13, 2013 at 10:53

1 Answer 1

1

As Andrew Thompson said, I need to use deployJava.js. You can find it in this Oracle tutorial. This tutorial describes in detail every step neccessary.

Now my Applet works on all three browsers (FF, Chrome, IE9) like a charm.

Thanks!

answered Feb 13, 2013 at 12:31
Sign up to request clarification or add additional context in comments.

1 Comment

I think everybody knows how frustrating it is, when you find someone with your exact problem, but he doesn't report, if he could find an answer :D

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.