Home arrow static arrow Java Programming [Archive] - Applet Permission Network Problem
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Applet Permission Network Problem
This topic has 4 replies on 1 page.

Posts:2
Registered: 7/31/04
Applet Permission Network Problem  
Jul 31, 2004 7:40 AM



 
Hi,

I have done alot of reading up on applets, to be honest Im more confused when I started!

Basically, here is the scenario:
I have a single java applet, which is a gui that takes some input and then fires it off (via UDP sock connection) to another machine on the same network, this works fine when using appletviewer and granting certain permissions.

But when I try and run it as an applet in a normal browser window it does not work, obviously because I am not "granting" permissions like in the appletviewer.
To be honest I dont want to have to start signing applets and certificates etc, this is not going to be a distributed app, so its for inhouse use it doesnt need to access the users local filesystem, so is there any way of doing this successfully, without all of the above and converting it to an application.

Thanks in advance,
Foobarr
 

Posts:11,200
Registered: 7/22/99
Re: Applet Permission Network Problem  
Jul 31, 2004 8:03 AM (reply 1 of 4)



 
Signing an applet is a pretty simple task in the end, it may seem complicated at first but it's really not. You don't need a sertificate, the tools you got with the SDK are enough. First, you need to package the applet in a .jar file (which you probably should do anyway). Next, sign the .jar file with the jarsigner tool. The exact steps to are in the security tutorial: http://java.sun.com/docs/books/tutorial/security1.2/toolsign/signer.html
 

Posts:4,906
Registered: 23/07/02
Re: Applet Permission Network Problem  
Jul 31, 2004 8:04 AM (reply 2 of 4)



 
There is probably a file somewhere which controls the applet plugin's security, but for anyone to tell you where you'd have to first tell them OS, browser and plugin details. Why don't you want to make an application, though? It's about 15 lines of code to turn an applet into an application.
 

Posts:2
Registered: 7/31/04
Re: Applet Permission Network Problem  
Jul 31, 2004 8:22 AM (reply 3 of 4)



 
Because it needs to be web based, it will be used for an admin tool...

Jsalonen: I dont think it is as easy as that, I have tried various steps like mentioned, how do I embed the applet so it knows to look for the cert etc??

Foobarred
 

Posts:11,200
Registered: 7/22/99
Re: Applet Permission Network Problem  
Jul 31, 2004 8:47 AM (reply 4 of 4)



 
Jsalonen: I dont think it is as easy as that, I have
tried various steps like mentioned, how do I embed the
applet so it knows to look for the cert etc??
In the simplest case you don't even need to provide a certificate, just make a signed .jar file with the jarsigner tool and write a normal <applet> tag:

<applet code="MyMainAppletClass" archive="signed.jar" width="xxx" height="yyy">
</applet>
 
This topic has 4 replies on 1 page.