Skip to main content

javax.net.ServerSocketFactory.getDefault().createServerSocket ?

6 replies [Last post]
bddeveloper
Offline
Joined: 2008-01-14
Points: 0

Hello,

We are not sure how to get around this error on the PS3. It works GREAT on the soft players. We have also checked to see that the network wrappers written by sun, that have been written include the javax.net.ServerSocketFactory so we assume this is a valid call for BD Live players. We have tried many different ports they all do the same thing.

Here is the line of code:
ServerSocket ss = javax.net.ServerSocketFactory.getDefault().createServerSocket(80);

Returns this exception:
java.security.AccessControlException Access Denied (java.socket.net.SocketPermision localhost:80 listen,resolve)

Here is our perm file:
<?xml version="1.0"?>

*

We are signing the .jar with the cookbook's jar signer. Is there a setting or something we need to do to get permission to call this on the PS3?

Scott

I should mention even this line of code is gives us a security exception:
Socket socket = javax.net.SocketFactory.getDefault().createSocket("sun.com", 80);

java.security.AccessControlException Access Denied (java.socket.net.SocketPermision sun.com:80 resolve)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chihiro_saito
Offline
Joined: 2006-11-08
Points: 0

Hi Scott,

This is just by reading your PRF, but shouldn't the app need "listen" in the host action list for the ServerSocket creation?

(Meanwhile, I've never heard of java.socket.net.SocketPermission; I hope it's a typo, since "java" package name should be restricted.)

Thanks,
Chihiro

bddeveloper
Offline
Joined: 2008-01-14
Points: 0

Hello Chihiro,

Yes it is a typo it should be: java.net.SocketPermission. Yes listen should be added, but even with the PRF file like this:







*



The exact same error happens. Maybe the off the shelf PS3 can't do networking on a non AACS disc? Has anyone tried to do networking on the PS3 yet? I can post some code to get an XML file if someone wants to also give it a try.

Scott

Joe Rice

I can confirm the PS3 is ok with networking on both AACS and non-AACS
discs.

This does ring a bell, though....

Did you go into the PS3 BD/DVD settings and set the BD Internet
Connection preference to always allow?

(This is related to Certified Network Connections, as detailed in the
2.2 spec)

Cheers,
Joe

On May 8, 2008, at 6:28 PM, bd-j-dev@mobileandembedded.org wrote:

> Hello Chihiro,
>
> Yes it is a typo it should be: java.net.SocketPermission. Yes
> listen should be added, but even with the PRF file like this:
>
> > orgid="0xffffffff" appid="0x4010">
>
>
>
>
>
> *
>

>
>
>

>
>
> The exact same error happens. Maybe the off the shelf PS3 can't do
> networking on a non AACS disc? Has anyone tried to do networking on
> the PS3 yet? I can post some code to get an XML file if someone
> wants to also give it a try.
>
> Scott
> [Message sent by forum member 'bddeveloper' (bddeveloper)]
>
> http://forums.java.net/jive/thread.jspa?messageID=273434
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

bddeveloper
Offline
Joined: 2008-01-14
Points: 0

Hello Joe,

The listen and the always allow flag is what did it.

Thank you!

Scott

pascal_sweden
Offline
Joined: 2011-11-30
Points: 0

Hello,

Are there any socket examples in Blu-ray examples?

Is the HDDVD Blu-ray Programming book the most recent book on Blu-ray programming?
Does it cover sockets in details?

I like to buy the book, but was wondering if there is more recent book or 2nd edition expected of this book?
Anybody who has close contact with the author?

And if there are some socket code examples, would be helpful if you send me the link?

Thanks,

Pascal

billf
Offline
Joined: 2004-02-13
Points: 0

Hi Pascal,

I'm in pretty close contact with the author :-)

The book does mention networking, but it's just a little over two pages. BD networking is pretty much just the standard java.net.Socket and java.net.URL out of Personal Basis Profile (essentially JDK 1.3). If you plan to use SSL, and you want your code to run on non-networked players, then there is an extra hoop you need to jump through to avoid problems with eager linking implementations, but I wouldn't worry about that initially... That's described on page 22-3.

The cookbook project on java.net has some networking examples. xlets/demos/twitterGRIN reads the public twitter feed, and demos/xlets/weatherWidget shows a weather report that it downloads from some service somewhere on the Internets. Various other stuff in the project concerns aspects of networking... Grepping for "Socket" generates a fair number of hits. For example, the "GrinXlet" framework includes a debug facility that makes a debug log available on port 6000 via a ServerSocket.

About books - I don't know of any other books in this area, and there aren't any plans for a second edition. It's a pretty small niche!

Cheers,

Bill Foote