Skip to main content

A small Netbeans Plugin for BD-J developers

17 replies [Last post]
chihiro_saito
Offline
Joined: 2006-11-08

Hi,

Thanks to my colleague's persistent encouragement, I've posted a small Netbeans module to netbeans.org's plugin portal, below.

http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?plug...

This module enables a new "Blu-ray Disc Java Project" type under the New Project selection. Underneath the cover, it takes a form of a sample project, where there is a helloworld Xlet, nearly emply BDMV file structure, bdjo and security tools from our hdcookbook repository, and a build script. One can build a disc image with the xlet being marked as autostart by invoking "build", and if WinDVD is installed in your system, run the disc image with a "run" command from the NB as well.

During the installation, the module asks for the location of the BD-J stub classes to compile xlets against.

It's a primitive module, but it has been pretty handy item for me to come up with some quick test cases for BD-J, by starting a new project and modifying the HelloWorld xlet to use the API in question. I hope it can be useful to some other people out there.

Best,
Chihiro

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joe Rice

The BDA posted the license app for these today:

http://blu-raydisc.info/license_app/javadocstubs_apps.php

I believe the cost is minimal or free.

Cheers,
Joe

---------------------------------------------------------------------
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

Bill Foote

This is really excellent news - thanks for alerting
us, Joe!

I know of a company (a sole proprietorship, as it happens)
that has faxed in the form from that web address. Assuming
that company doesn't run into any non-disclosure requirements,
I should be able to report back on the process and the
responsiveness observed.

Cheers,

Bill

Joe Rice wrote:
> The BDA posted the license app for these today:
>
> http://blu-raydisc.info/license_app/javadocstubs_apps.php
>
> I believe the cost is minimal or free.
>
> Cheers,
> Joe
>
>
> ---------------------------------------------------------------------
> 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

chihiro_saito
Offline
Joined: 2006-11-08

Hi Samuel,

> I added java/* (minus applet,sql and beans) from the jdk's jre/lib/rt.jar and it compiles.
Any tips on additional classes to have/remove?

I'm picking up this question, partly because this might help others who are using software players' bdjclasses.jar as well.

Adding jdk's rt.jar is one option, but using PBP's runtime classes is better, since PBP defines the correct minimum java.* package set for BD-J. You can get the impl from here:

http://java.sun.com/javame/downloads/index.jsp
Personal Basis Profile 1.1 Reference Implementation (JSR 217)

What we care is pbp-1_1-fr-ri.zip. The class files we want are in two archives, Optimized_nosym/lib/basis.jar and Optimized_nosym/lib/btclasses.zip. Unjar/Unzip, and add the .class files into your jar/zip file, and use that jar/zip for javac's bootclasspath.

(Note that it's even better to use PBP 1.0 API set instead of 1.1, since 1.1 is a superset of 1.0 and the player can be in either version. However I can't find the correct download link for PBP 1.0 in Sun's site right now.)

Chihiro

Joe Rice

Hi Chihiro -

Does this work?

http://jcp.org/aboutJava/communityprocess/final/jsr129/index.html

Joe

On Jul 29, 2008, at 1:19 PM, bd-j-dev@mobileandembedded.org wrote:

> Hi Samuel,
>
>> I added java/* (minus applet,sql and beans) from the jdk's jre/lib/
>> rt.jar and it compiles.
> Any tips on additional classes to have/remove?
>
> I'm picking up this question, partly because this might help others
> who are using software players' bdjclasses.jar as well.
>
> Adding jdk's rt.jar is one option, but using PBP's runtime classes
> is better, since PBP defines the correct minimum java.* package set
> for BD-J. You can get the impl from here:
>
> http://java.sun.com/javame/downloads/index.jsp
> Personal Basis Profile 1.1 Reference Implementation (JSR 217)
>
> What we care is pbp-1_1-fr-ri.zip. The class files we want are in
> two archives, Optimized_nosym/lib/basis.jar and Optimized_nosym/lib/
> btclasses.zip. Unjar/Unzip, and add the .class files into your jar/
> zip file, and use that jar/zip for javac's bootclasspath.
>
> (Note that it's even better to use PBP 1.0 API set instead of 1.1,
> since 1.1 is a superset of 1.0 and the player can be in either
> version. However I can't find the correct download link for PBP 1.0
> in Sun's site right now.)
>
> Chihiro
> [Message sent by forum member 'chihiro_saito' (chihiro_saito)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290181
>
> ---------------------------------------------------------------------
> 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

chihiro_saito
Offline
Joined: 2006-11-08

Joe -

Thanks for a quick lookup. But unfortunately we don't seem to include .java or .class files to the spec bundle, just htmls. This zip is good for reading and understanding java.* level APIs for BD-J, but can't be used for compilation...

Chihiro

Joe Rice

Oh, duh, sorry!

Joe

On Jul 29, 2008, at 1:41 PM, bd-j-dev@mobileandembedded.org wrote:

> Joe -
>
> Thanks for a quick lookup. But unfortunately we don't seem to
> include .java or .class files to the spec bundle, just htmls. This
> zip is good for reading and understanding java.* level APIs for BD-
> J, but can't be used for compilation...
>
> Chihiro
> [Message sent by forum member 'chihiro_saito' (chihiro_saito)]

---------------------------------------------------------------------
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

samuelb
Offline
Joined: 2008-07-25

Hi,

I had the same problem except running linux, though it doesn't seem to matter.

I changed bootclasspath to classpath and it compiles correctly. I havn't tried the project yet though. I saw this in another simple build BD-J package so ought to be ok.

As in:
classpath="${bdj.classes}"
destdir="${build.dir}/classes"
source="1.3" target="1.3"
debug="on" deprecation="on">

/Samuel

chihiro_saito
Offline
Joined: 2006-11-08

Hi Samuel,

> I changed bootclasspath to classpath and it compiles correctly.

That makes me suspect that the jar that your "bdj.classes" point to does not contain the whole bd-j stack. I can imagine that software players' jar file may not have all the classes, since some fundamental classes like java.lang can be romized into the JavaVM. Thanks for pointing it out.

Using classpath instead of bootclasspath is OK as long as you're careful with which APIs you call in your xlet. bootclasspath ensures that the application is using what's included in that path only, and not from the jdk that javac is coming from. In other words, when you use classpath, an xlet that calls methods that's not in bd-j but in jdk (say, URLConnection.setConnectTimeout()) will still compile fine, and then fail when you try to run the disc image with that xlet on a player. In the ideal world bdj.classes contains exactly the classes BD spec guarantees, and bootclasspath ensures that your xlet is compliant with the spec.

Chihro

samuelb
Offline
Joined: 2008-07-25

Ah ofcourse, make sense, I got mine from Nero 8.

I added java/* (minus applet,sql and beans) from the jdk's jre/lib/rt.jar and it compiles.
Any tips on additional classes to have/remove?

Though my PS3 doesn't like it. I put it on a usb drive(actually my phone), which works with this:

http://dl.qj.net/Blaster-Bunny-BD-J-PlayStation-3/pg/12/fid/17444/catid/518

Any tips?

Thanks

/Samuel

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Ah ofcourse, make sense, I got mine from Nero 8.
>
> I added java/* (minus applet,sql and beans) from the jdk's jre/lib/rt.jar and it compiles.
> Any tips on additional classes to have/remove?
>
> Though my PS3 doesn't like it. I put it on a usb drive(actually my phone), which works with this:
>
> http://dl.qj.net/Blaster-Bunny-BD-J-PlayStation-3/pg/12/fid/17444/catid/518
>
> Any tips?

Well, if you want the source code to blaster bunny, and a complete
build environment and build scripts to create it from scratch, just
go over to the SVN repository at https://hdcookbook.dev.java.net
(click on "Subversion" on the left for the full command), and voilà.

I must admit, when I saw that link, I had a funny feeling
about it. I followed it and became download number 1862. The
copyrighted image of Bugs Bunny they used at dl.qj.net has nothing
to do with me or the hdcookbook project, but the BD-J xlet that
they've copied (without attribution) and put in AVCHD.zip is exactly
the sample project we put together to go with the McGraw/Hill
HD cookbook book, and it's the same thing you can get from source
on the open hdcookbook repository.

I don't want to seem snippy, and I think it's great that people are
using the hdcookbook stuff, but I've got to say that this qj.net thing
is a little weird. If they were really interested in helping people
do useful stuff, why don't they give a pointer to the place the source
code comes from? Why doesn't "silenoz" at qj.net give credit to the
people who's work he or she is, uh, using? The whole thing has a
back-alley kind of feel to it.

Anyway, the actual Blaster Bunny game that comes with the HD cookbook
sample disc image was originally written by Phil Starner of Javelin, for
HD-DVD in iHD. It was adapted into Java by a guy named Shant Mardigian
over at Technicolor, and then I made a couple of changes (including making
it easier to get higher scores in the BD-J version than are possible in
the HD-DVD version :-) ). The version on the HD cookbook repository today
benefits from the brilliant work done on codesigning, creating the various
disc files from XML source, and build management that have been done by the
BD-J authoring team at Sun (Chihiro, Jaya, Sundar, and on a good day, me).

The purpose of putting together this workspace (and writing the BD-J chapters
of the McGraw/Hill book) was to help folks get started in this area. I'd
recommend getting a copy of the book, bringing over the repository, and
experimenting with what's there.

Cheers,

Bill
--
Bill Foote bill.foote @ sun.com
Blu-ray Java and Authoring Architect Sun Microsystems, Los Angeles

---------------------------------------------------------------------
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

samuelb
Offline
Joined: 2008-07-25

Thanks for the interesting background info, I found the HD cookbook( which I've ordered, but Swedish online stores aren't exacly known for speed and service :/ ) from that source somehow.But I agree, give credit where credit is due.

If I'm correct the whole thing is a "ps3 hack"(!) posted on ps3hax.net. So no wonder about the back-alley feeling :)

The same place has a minimal setup with a hello world much like the example from this plugin. Though I get that one to work. But creating the disc image created by this plugin isn't even recognised. Copying the 00000.jar to the "minimal setup" starts something but no helloworld. Oh well, I'll prolly use vim instead of netbeans anyhow :)

In anycase thanks for the hard work on the plugin, and ofcourse java/BD-J etc :)

/Samuel

daddyhop
Offline
Joined: 2006-05-05

Hi,

I just tried the plugin, and I'm having a little trouble. Here's my configuration:

1. Win XP
2. Netbeans 6.1
3. PowerDVD bdj.jar file

When I try to build the sample BD-J application, I get the following error:

"Fatal Error: Unable to find package java.lang in classpath or bootclasspath"

Why does this happen? By the way, I can build non-bd-j projects perfectly fine.

Thanks,

Bruce

chihiro_saito
Offline
Joined: 2006-11-08

Hi Bruce,

The xlet compilation happens against a property ${bdj.classes}, in which for your setup should be pointing to PowerDVD's bdj.jar. It sounds like this property is not set correctly for you.

bootclasspath="${bdj.classes}"
destdir="${build.dir}/classes"
source="1.3" target="1.3"
debug="on" deprecation="on">

In the root directory where you created a sample BD project, there should be a file called build.properties. This file doesn't show up from the Netbeans "file" section, but is visible from the Windows file explorer etc. The property is defined there. Can you double check it's content?

Best,
Chihiro

michaelvogt
Offline
Joined: 2007-08-20

Hello Chihiro.

Thanks for making the plugin available.

I tried to install the plug-in in Netbeans for Windows, but after the license screen, I get a network error dialog, asking me the check my proy settings. Since I am on a direct network connection, there seems to be another problem. Don't know where to look for more useful information about the problem.

Any idea?

Thanks,
Michael Vogt

chihiro_saito
Offline
Joined: 2006-11-08

Hi Michael,

I don't have the idea right away... I take it that you're installing this as a downloaded plugin from your local storage, right? Are you able to install other plugins?

After the license screen, there should be a certificate validation screen (in which the BDProjectType gives a warning for being untrusted - trying to find a solution now). It does feel like another problem; the installation completes for me even without any network connection enabled, as a matter of fact.

Chihiro

Michael Vogt

Hello Chihiro.

Don't know what's been wrong. I tried it again, and it works now. Sorry.

Have you tried your plug-in with Netbeans 6.1 already?

Cheers,
Michael
[att1.html]

chihiro_saito
Offline
Joined: 2006-11-08

Hi Michael,

I'm glad to hear that the it's working for you now.

As for 6.1, I tried with RC2 and didn't see anything different w.r.t my plugin. I'm happy with NB 6.1 so far - it claims for up to 40% faster startup time compared to 6.0, and I can feel the difference, indeed.

Best,
Chihiro