CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   Applet Not Loading (http://www.codingforums.com/showthread.php?t=288152)

billboy 02-22-2013 11:24 PM

Applet Not Loading
 
I have an applet someone wrote for me back in 2004. I am trying to get it to work on my website but it doesnt load. It works on my computer but not when i load it on web server and try to run it from my website If I use this code:

Code:

<applet name="LoanCalculator"
    code="MWLoan.Loan.class"
    archive="LoanCalculator.jar, jakarta-poi-1.5.1-final-20020615.jar"
    width=10 height=10>
    </applet>

I goes as far as a java security warning pop up and then thats it


If I try and go this route:

Code:

<embed id="LoanCalculator"
      type="application/x-java-applet;version=1.6"
      width="256" height="256"
      archive="LoanCalculator.jar, jakarta-poi-1.5.1-final-20020615.jar"
      code="MWLoan.Loan.class"
      pluginspage="http://java.com/download/"
      myParam="My Param Value" />-->

it gives me an exception error

MWLoan.Loan.class could not be found

here is a link to my site:

http://www.pacificfinancial.com/loan...der/applet.htm

Can someone point me in the right direction of what I am doing wrong. Thank you

Fou-Lu 02-24-2013 03:50 PM

There's not a lot to go on here. So the first thing you should verify is that you have a certificate for your applet. Has it been signed?

billboy 02-24-2013 04:40 PM

I dont know, like I said it was built by another developer sometime ago but I like the app
It was on another website and worked fine and it does run on my computer I am not sure if that menas anything

Fou-Lu 02-24-2013 04:50 PM

Nope, the applet cannot be compared directly to running the jar. The problem is that applets often require signing for what they can and cannot do. Here's a link for what they can and cannot do: http://docs.oracle.com/javase/tutori.../security.html
Here's the instructions for jar signing: http://docs.oracle.com/javase/1.5.0/...a_signing.html. It is a big process yes, but if your application does anything listed in the first links section for what the unsigned applets "cannot" do, than you must sign the applet.

Let me take a step back here though. I didn't see your error the first time as being cannot find a class. Its been many years since I've written an applet, but like java.exe I'd expect that the .class on the codebase is not what you want. Remove the .class from the applet code attribute, and try again.

billboy 02-24-2013 09:21 PM

Nothing at all happens when I remove the .class from the applet attribute

I found some notes in an mno file and they specifically state the MWLoan.Loan.class file to be there.


its really bizare

billboy 02-24-2013 09:52 PM

I found my problem , after reviewing the notes more carefully I see that I had an incorrect case letter

It running now

Now I need to learn how to edit the files and make some cosmetic changes

Fou-Lu 02-25-2013 01:04 PM

Glad to hear you got it working. I'm a bit surprised that applets want .class extensions. I would have expected them to run just like the java does without the .class.


All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.