Skip to main content
Last updated March 09, 2011 22:34, by billf
[[image: wiki.jpg|right|200x150px]] ==Getting a BD-J Platform Definition For a Java developer to develop BD-J applications, they must be able to read the API documentation of the platform in a human-readable form, and they need to compile applications against a "" platform definition file. Copyright on the BD-J platform definition is held by various different parties, so unfortunately it's not presently possible to download the entire platform definition as one unified piece. Instead, you have to collect the source files that make up the platform definition yourself, from the BDA, from DVB, and from Sun Microsystems. In order to get the BDA part, you'll need to send them a request in the form of a signed document, so it might take a day or two before you can get the needed files from them. The process of assembling the pieces into the form needed by the BD-J developer involves a number of steps. To save everybody time and effort, we've created a shell script that does this job. It's available at, and it's reproduced in full on this page. It contains extensive comments at the beginning of the file that explain where to obtain all of the needed parts, and how to run the shell script. ===What about OCAP? A similar platform definition is readily available, at As of this writing, the OCAP stubs were "disclaimerized," that is, the text documentation of the Sun parts were replaced with a disclaimer. ===What about the full written specifications? Both Blu-ray and OCAP are built on top of GEM and MHP, as well as Personal Basis Profile and Java TV. Blu-ray requires at least PBP 1.0, and OCAP's current versions require at least PBP 1.1. For GEM and MHP, you can download the specs for free at by clicking on "Technical Specifications." BD-J is built on MHP/GEM 1.0 (GEM version 1.0.3 as of this writing, in March '09). The Blu-ray specification itself, particularly part 3.2 that contains the Java definitions, is available for a fee and under a license from the BDA. Please contact them for details. The BDA licensing office has a web page at ===Platform Definition shell script Here's the shell script that you can use to assemble a BD-J platform definition: <pre> #!/bin/sh # # BD-J Platform Definition # Bill Foote,, # January 18, 2009 # # This shell script can be used to build a unified set of platform # documentation of the BD-J platform, and a set of "compilation stubs" # that allow applications to be compiled. The resulting platform # documentation will be in HTML "javadoc" form, and will include all # APIs defined in or required by the Blu-ray Disc BD-ROM specification, # part 3.2. In order to produce this, you will have to download the Java # source code that defines different parts of the platform from a variety # of sources, and assemble that source code as directed herein. # # This set of javadocs will have the full descriptions of all of the # classes and methods. If you find yourself saying "of course, that's # what I'd expect," then consider yourself fortunate for not having # experienced the first couple of years :-) # # You will need to obtain: # # * The BD-J JavaDocStubs, available from the Blu-ray Disc # association. An application can be found at # # # * The GEM Stubs for Packaged Media Target (GEM 1.0.3) (August 2008), # available from # # * Sun's "Javadoc API Reference Documentaiton for Blu-ray Disc # Application Development", available from # # # APIs that are not mentioned here may be a required part of Blu-ray # players. If you wish to write BD-J applications that access these APIs, # you'll need to extend the compilation stubs, and perhaps also the # javadoc documentation with these API defintions. For example, the BD+ # subsystem may include APIs that can be accessed by certain BD-J # applications, but the source of these APIs is not called out in the # part 3.2 specifications, so instructions on obtaining the correct version # of these APIs is not included here. # # This build script is in the form of a shell script. It can be directly # executed on any Unix-based computer (such as OS/X or Linux), and it can # be run on Windows in a Unix emulation environment such as Cygwin. # # # INSTALLING THE SOURCE CODE # ========================== # # # First, go to the directory that contains this shell script, and make # a directory called "originals". You'll be copying the source code that # you download into this directory. # # Next, obtain the BD-J JavaDocStubs from the BDA. You'll eventually # get a file from the BDA called # BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar . Copy this file into # the originals directory. # # Now, get a copy of the "Stubs for Packaged Media Target (GEM 1.0.3), # under the GEM 1.0.3 heading at . # They'll be in a file called ; copy this into # the originals directory. # # Get the four zip files that make up Sun's "Javadoc API Reference # Documentation for Blu-ray Disc Application Development" at # . # Download the four zip files to the originals direcory. The four # files are "Java TV API (JSR 927)" in, "Java Secure Socket # Extension (JSSE) 1.0.3 for CDC 1.0.2" in, "Foundation # Profile (FP) and Connected Device Configuration (CDC), version # 1.0b" in, and "Personal Basis Profile (PBP), version 1.0b # in Your originals directory should now have these files: # # BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar # # # # # # # # # That's it! You've now assembled all of the pieces. Now, just bring up # a shell window in the directory containing this shell script, and execute # it with: # # sh # # The shell script relies on a few very common programs: unzip, zip, javac, # and javadoc. # # First, we unpack all of the source. # rm -rf tmp mkdir tmp cd tmp mkdir bda cd bda unzip ../../originals/BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar cd .. unzip ../originals/ unzip ../originals/ unzip ../originals/ unzip ../originals/ unzip ../originals/ # # Now we compile the interactive profile stubs. We're currently in the # tmp directory. # rm -rf ../interactive mkdir ../interactive mkdir classes GEM=mug226-gem_packaged_media/gem_packaged_media/interactive/src find fp10b -name '*.java' -print > files.list find pbp10b -name '*.java' -print >> files.list find jsse103 -name '*.java' -print >> files.list find jtv111 -name '*.java' -print >> files.list find $GEM -name '*.java' -print >> files.list find bda -name '*.java' -print >> files.list javac -bootclasspath classes -d classes -source 1.3 -target 1.3 \ -sourcepath fp10b:pbp10b:jsse103:jtv111:$GEM:bda \ @files.list cd classes zip -r ../../interactive/ * cd .. rm -rf classes mkdir ../interactive/html javadoc -bootclasspath ../interactive/html -d ../interactive/html \ -source 1.3 \ -tag implementation:a:"Implementation note:" \ -sourcepath fp10b:pbp10b:jsse103:jtv111:$GEM:bda \ @files.list rm files.list # # # Now, we do the same thing for the enhanced profile. This is like the # above, but we omit JSSE, and use the GEM enhanced profile. # ("Enhanced" is the GEM term for "without connection to the Internets"). # # rm -rf ../enhanced mkdir ../enhanced mkdir classes GEM=mug226-gem_packaged_media/gem_packaged_media/enhanced/src find fp10b -name '*.java' -print > files.list find pbp10b -name '*.java' -print >> files.list find jtv111 -name '*.java' -print >> files.list find $GEM -name '*.java' -print >> files.list find bda -name '*.java' -print >> files.list javac -bootclasspath classes -d classes -source 1.3 -target 1.3 \ -sourcepath fp10b:pbp10b:jtv111:$GEM:bda \ @files.list cd classes zip -r ../../enhanced/ * cd .. rm -rf classes mkdir ../enhanced/html javadoc -bootclasspath ../enhanced/html -d ../enhanced/html \ -source 1.3 \ -tag implementation:a:"Implementation note:" \ -sourcepath fp10b:pbp10b:jtv111:$GEM:bda \ @files.list rm files.list # # All done! # cd .. rm -rf tmp echo "" echo "" echo "If the above ran without any serious problems, you should now have" echo 'two directories: "enhanced" and "interactive". These contain the' echo "compilation stubs and HTML javadocs for these two profiles, in the" echo 'file "" and the directory "html" respectively.' echo "" echo "You can refer to the HTML documentation, and you can use the" echo "file to compile BD-J applications, either using" echo '"javac -bootclasspath" or by configuring your IDE' echo "appropriately." echo "" echo "" # End of </pre>
Please Confirm