Getting SocketPermission for localhost without signing JARs

I

igor

Hello.
I am writting the java web start application which I haven't to sign.
I need to use methods InetAddress.getAllByName(),
InetAddress.getLocalHost() which use the
method chechConnect() of the SecurityManager thus my application has
to get a java.io.SocketPermission for 127.0.0.1, "resolve".

I was wondering if you could suggest me how to get such permission
without signing my java web start application.
 
A

Andrew Thompson

On Mar 24, 2:10 am, (e-mail address removed) wrote:
...
I am writting the java web start application which I haven't to sign.

Why? Note that code can be signed for free.

Andrew T.
 
C

Chris Uppal

I am writting the java web start application which I haven't to sign.
I need to use methods InetAddress.getAllByName(),
InetAddress.getLocalHost() which use the
method chechConnect() of the SecurityManager thus my application has
to get a java.io.SocketPermission for 127.0.0.1, "resolve".

I was wondering if you could suggest me how to get such permission
without signing my java web start application.

I don't know much about the permissions unsigned WebStart apps have, but it
seems reasonable that they would be prohibited from enquiring what network
interfaces are available. If so then I doubt whether there is any way you can
do this.

But what I wanted to ask is: why do you want it ? I can't think of much use
for that information, and -- even if Java made it available to your restricted
application -- the data isn't likely to be much use or very reliable. For
instance the machine I'm typing into thinks it knows what its numeric IP
address and hostname are, but neither the IP nor the hostname are of any use at
all outside my immediate LAN (and wouldn't necessarily be of any use even
inside the LAN except that I like to use a very static local configuration).
If your application were running on this machine, then even if I were willing
to let it read that information, I can't think of anything obviously useful it
could do with it.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top