aspose file tools*
The moose likes Applets and the fly likes Applet loads from i dont know where Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet loads from i dont know where" Watch "Applet loads from i dont know where" New topic
Author

Applet loads from i dont know where

Ka Parra
Greenhorn

Joined: Feb 02, 2012
Posts: 5
i have this applet that loads in an html file.

When we deployed it on the production server it works perfectly. But when I try it on my laptop, the applet doesn't load and has this error:


And so i tried running in debug mode and same error happens. So what i did is delete the actual jar file on my laptop and i expect that the error will be missing jar file.
But the error is still the same, production and debug mode... I'm not sure where the application gets the jar file if I already deleted it on my local.
This only happens on my laptop, to other computers its working fine... its really like magic... please tell me if there is a problem with my laptop or the code just looks somewhere else.

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I'm not sure where the application gets
> the jar file if I already deleted it on my local. 

clear the cache.
Ka Parra
Greenhorn

Joined: Feb 02, 2012
Posts: 5
Michael Dunn wrote:> I'm not sure where the application gets
> the jar file if I already deleted it on my local. 

clear the cache.


hi michael. i already cleared the cache, the temp files and everything. but its still the same.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18662
    
    8

Ka Parra wrote:When we deployed it on the production server it works perfectly. But when I try it on my laptop, the applet doesn't load...


Since we're talking about an applet, this statement needs some clarification.

It's deployed on the production server and working perfectly... where? Since applets are designed to be run on a client which downloads the applet from the server, that part can only mean that it works perfectly on clients which download it.

But then you try it on your laptop... downloading it from where? Presumably since it doesn't work perfectly, you must be downloading it from somewhere other than the production server.

Now I am sure there is something which I have misunderstood, but that's because you haven't provided a description of the problem. So it would help if you could do that.
Ka Parra
Greenhorn

Joined: Feb 02, 2012
Posts: 5
hi paul. If I'm opening the site linked to our production server http://10.199.10.22:9080/eMES/menuframe.htm then i expect the program to load the applet from that server. And if i'm trying to open http://localhost:9080/eMES/menuframe.htm which is the link to my local development code, then I expect to load the applet from the jar file on my laptop. but both of them is not loading the applet for me.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18662
    
    8

I see. So in fact you do know where you are downloading the applet from, or you can control that. And on your laptop, when you download the applet from anywhere and try to run it, that fails. So it's still a mystery to me what you meant when you said it ran perfectly on the production server.

But anyway it looks to me like your applet just isn't set up correctly. I notice that it's using the javax.comm package, which is for interfacing with serial ports. In my opinion using an applet to do this is an error in itself, since that package needs DLLs and configuration files installed in just the right place. (If I recall correctly -- I haven't tried it for nearly 10 years and I don't expect to ever use it again because new computers don't even come with serial ports any more.) You would be better off to use Web Start for that, since you can at least control the loading of DLLs.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I agree that using applets for this is not the right approach. It is possible to package the DLLs along with the applet classes in jar files, though, provided they they are signed. That way they wouldn't need to be installed on the client computer already. That's a bit tricky to get right, though..
Ka Parra
Greenhorn

Joined: Feb 02, 2012
Posts: 5
hi guys, could you recommend any other tool that I can use instead of applets? I'm only copying the old codes and I was able to make it work before, but now unfortunately, I can't still make it work.
Requirement here is to use serial port for barcode input. I'm also using Struts and I'm not that familiar with stuffs other than applet to do this.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
You're using Struts in an applet? I kinda doubt that...

But Paul has already mentioned Java WebStart apps, a.k.a. JNLP.
Ka Parra
Greenhorn

Joined: Feb 02, 2012
Posts: 5
Tim Moores wrote:You're using Struts in an applet? I kinda doubt that...


Im using applet and embed them on my jsp pages, that's what I mean. I'll try that suggestion
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet loads from i dont know where