Skip to main content

BD-J Permission Request File - Basic Questions

5 replies [Last post]
vinaykagarwal
Offline
Joined: 2006-01-14
Points: 0

When I create a new Blu-Ray application using NetBeans 6.5 and build it, I see the following snippet in the output
...
updating: META-INF/MANIFEST.MF
adding: META-INF/SIG-BD00.SF
adding: META-INF/SIG-BD00.RSA
adding: cdcapplication2/
signing: cdcapplication2/Main$1.class
signing: cdcapplication2/Main.class
signing: cdcapplication2\bluray.Main.perm
...

but I can't find bluray.Main.perm file anywhere. My questions are
1. Is NB using default settings to create a *.perm file on the fly?
2. For NB projects, which directory should *.perm file be placed?
3. Where can I see a sample of *.perm file?

Thanks in advance.

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

I'm pretty sure that SDK is generating the PRF on the fly. Check the content of the 00000.jar that gets created; cdcapplication2\bluray.Main.perm should be in there. According to the BD spec, the perm file should be placed at the same level as the main xlet's .class file with bluray..perm name. Note that the should not include the package part of the fully qualified classname.

Unfortunately, if you need to change the perm file in the jar manually, then the jar needs to be re-signed in order for the app to be trusted, since once you open the jar, the signing is gone. I'm not sure how easy it is to do this in SDK, since it seems to hide most of the steps for making a disc image.

vinaykagarwal
Offline
Joined: 2006-01-14
Points: 0

NetBeans 6.5 is generating a PRF file on the fly even it I provide one! The file I provided exists in
/build/compiled and
/build/preprocessed folders but when I look inside the jar file created, it contains a totally different file with virtually no permissions. I can't find what setting to change to make NB use my PRF file.

jdevguy
Offline
Joined: 2009-01-06
Points: 0

go into the permissions dialog of your project, click "Application Descriptor" and then select BD-J.
That's where you control the permissions.

jdevguy
Offline
Joined: 2009-01-06
Points: 0

I mean properties dialog....

Bill Foote

Hi Vinay,

I can't speak for what NetBeans is or isn't doing, but I can
say what you need for a BD-J application. I'd recommend
taking a look at the build files in the HD cookbook
project, especially /xlets/grin_samples, e.g.
SimpleGame and GrinBunny. Both are signed.

In short, if your xlet class is com.mypackage.MyXlet,
then in the JAR file you need to have the file
com/mypackage/bluray.MyXlet.perm. In other words,
bluray.MyXlet.perm needs to land in the same directory
as MyXlet.class.

There are many samples of permission request files in
xlets/grin_samples. Most (all?) ask for more permissions
than the xlets really need.

Cheers,

Bill

bd-j-dev@mobileandembedded.org wrote:
> When I create a new Blu-Ray application using NetBeans 6.5 and build it, I see the following snippet in the output
> ...
> updating: META-INF/MANIFEST.MF
> adding: META-INF/SIG-BD00.SF
> adding: META-INF/SIG-BD00.RSA
> adding: cdcapplication2/
> signing: cdcapplication2/Main$1.class
> signing: cdcapplication2/Main.class
> signing: cdcapplication2\bluray.Main.perm
> ...
>
> but I can't find bluray.Main.perm file anywhere. My questions are
> 1. Is NB using default settings to create a *.perm file on the fly?
> 2. For NB projects, which directory should *.perm file be placed?
> 3. Where can I see a sample of *.perm file?
>
> Thanks in advance.
> [Message sent by forum member 'vinaykagarwal' (vinaykagarwal)]
>
> http://forums.java.net/jive/thread.jspa?messageID=324582
>
> ---------------------------------------------------------------------
> 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