Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with SocketPermission in java policy file

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm trying to give permission for my applet use any port of an ftp connection (to upload some files to it), I need to edit the java.policy for for this.
I'm using FTP not on passive mode (The server won't allow passive mode) so the connections are made on port 21, but then the port used for transmission seems to be random...

I need to use this on java.policy file to set permissions:

permission java.net.SocketPermission "ftpserverURL:21", "listen,accept,connect,resolve";

But can I do a general line to allow permissions to all ports?
Something like:

java.net.SocketPermission "ftpserverURL:Allports", "listen,accept,connect,resolve";

Otherwise the JVM keeps giving me a permission error since everytime if tries to start uploading it'll use a different port (I'm not sure why this happens... maybe because it's not on passive mode?).

If anyone can help me please I really need it
thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top