java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic BDJPlatformDefinition (8 - 30 Mar 2009 - Main.billf)
Line: 1 to 1
 
META TOPICPARENT name="Blu-RayDisc"
Line: 25 to 25
 https://opencable.dev.java.net/servlets/ProjectProcess?tab=4. As of this writing, the OCAP stubs were "disclaimerized," that is, the text documentation of the Sun parts were replaced with a disclaimer.
Added:
>
>

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 http://www.mhp.org/ 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 http://blu-raydisc.info.

 

Platform Definition shell script

Here's the shell script that you can use to assemble a BD-J platform definition:


 <<O>>  Difference Topic BDJPlatformDefinition (7 - 18 Jan 2009 - Main.billf)
Line: 1 to 1
 
META TOPICPARENT name="Blu-RayDisc"
Line: 34 to 34
 # # BD-J Platform Definition # Bill Foote, bill.foote@sun.com, billf@jovial.com
Changed:
<
<
# October 27, 2008
>
>
# 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"
Line: 148 to 148
 mkdir ../interactive mkdir classes GEM=mug226-gem_packaged_media/gem_packaged_media/interactive/src
Added:
>
>
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
Changed:
<
<
`find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jsse103 -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print` `find bda -name '*.java' -print`
>
>
@files.list
 cd classes zip -r ../../interactive/classes.zip * cd ..
Line: 165 to 166
  -source 1.3 -tag implementation:a:"Implementation note:" -sourcepath fp10b:pbp10b:jsse103:jtv111:$GEM:bda
Changed:
<
<
`find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jsse103 -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print` `find bda -name '*.java' -print`
>
>
@files.list rm files.list
 # #
Line: 185 to 181
 mkdir ../enhanced mkdir classes GEM=mug226-gem_packaged_media/gem_packaged_media/enhanced/src
Added:
>
>
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
Changed:
<
<
`find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print` `find bda -name '*.java' -print`
>
>
@files.list
 cd classes zip -r ../../enhanced/classes.zip * cd ..
Line: 201 to 198
  -source 1.3 -tag implementation:a:"Implementation note:" -sourcepath fp10b:pbp10b:jtv111:$GEM:bda
Changed:
<
<
`find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print` `find bda -name '*.java' -print`
>
>
@files.list rm files.list
 

#


 <<O>>  Difference Topic BDJPlatformDefinition (6 - 11 Dec 2008 - Main.chihiro_saito)
Line: 1 to 1
 
META TOPICPARENT name="Blu-RayDisc"

 <<O>>  Difference Topic BDJPlatformDefinition (5 - 10 Nov 2008 - Main.billf)
Line: 1 to 1
 
META TOPICPARENT name="Blu-RayDisc"
Line: 19 to 19
 comments at the beginning of the file that explain where to obtain all of the needed parts, and how to run the shell script.
Added:
>
>

What about OCAP?

A similar platform definition is readily available, at https://opencable.dev.java.net/servlets/ProjectProcess?tab=4. As of this writing, the OCAP stubs were "disclaimerized," that is, the text documentation of the Sun parts were replaced with a disclaimer.

 

Platform Definition shell script

Here's the shell script that you can use to assemble a BD-J platform definition:


 <<O>>  Difference Topic BDJPlatformDefinition (4 - 27 Oct 2008 - Main.billf)
Line: 1 to 1
 
META TOPICPARENT name="Blu-RayDisc"
Line: 28 to 28
 # # BD-J Platform Definition # Bill Foote, bill.foote@sun.com, billf@jovial.com
Changed:
<
<
# October 17, 2008
>
>
# October 27, 2008
 # # 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"
Line: 157 to 157
 mkdir ../interactive/html javadoc -bootclasspath ../interactive/html -d ../interactive/html -source 1.3
Added:
>
>
-tag implementation:a:"Implementation note:"
  -sourcepath fp10b:pbp10b:jsse103:jtv111:$GEM:bda `find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print`
Line: 192 to 193
 mkdir ../enhanced/html javadoc -bootclasspath ../enhanced/html -d ../enhanced/html -source 1.3
Added:
>
>
-tag implementation:a:"Implementation note:"
  -sourcepath fp10b:pbp10b:jtv111:$GEM:bda `find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print`
Line: 227 to 229
 

-- Main.billf - 17 Sep 2008

Deleted:
<
<
-- Main.billf - 18 Oct 2008
 \ No newline at end of file
Added:
>
>
-- Main.billf - 18 Oct 2008 (Upgraded to official Sun stubs) -- Main.billf - 27 Oct 2008 (Added "-tag implementation" to javadoc command)
 \ No newline at end of file

 <<O>>  Difference Topic BDJPlatformDefinition (3 - 18 Oct 2008 - Main.billf)
Line: 1 to 1
 
META TOPICPARENT name="Blu-RayDisc"
Line: 28 to 28
 # # BD-J Platform Definition # Bill Foote, bill.foote@sun.com, billf@jovial.com
Changed:
<
<
# Sept. 16, 2008
>
>
# October 17, 2008
 # # 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"
Line: 39 to 39
 # source code that defines different parts of the platform from a variety # of sources, and assemble that source code as directed herein. #
Changed:
<
<
# Certain of the Sun pieces aren't yet available as "stubs source code", # that is, Java source code that does not include meaninful method # implementations. These are in the process of being published in Sun. # In the meantime, it is possible to download the reference implementation # of the Sun technologies in question. These reference implementations # might have documentation that is slightly out of date with recent # specification bugfixes, but it is extremely close, and in all important # aspects it is adequate for BD-J development. It's also much better than # other approximations available, such as using the implementation of a # PC-based BD-ROM player (which might contain a superset of the minimum # required BD-J APIs). For now, we recommend the approach outlined in this # document; as the stubs source code from Sun becomes available, this document # will be amended (and simplified!).
>
>
# 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 smile
 # # You will need to obtain: #
Line: 62 to 53
 # * The GEM Stubs for Packaged Media Target (GEM 1.0.3) (August 2008), # available from http://www.mhp.org/mhpgem10.htm #
Changed:
<
<
# * The Java TV API 1.1_01 Source RI and Documentation, available # from http://java.sun.com/products/javatv/ . # # * The Java TV API 1.1_01 Binary Reference Implementation and # Documentation, available from http://java.sun.com/products/javatv/ # # * Source code for the other Sun components, Personal Basis Profile # 1.0 and JSSE for CDC 1.0. Sun is preparing a download of these # components (which will also include Java TV), but this probably # won't be ready before October 2008. In the meantime, you can get # a copy of "fake" stubs that contain the correct API signatures, but # that have had the API element descriptions replaced with a disclaimer. # This can be downloaded from # http://hdcookbook.com/bdj_platform/fake_stubs_pbp_jsse.zip.
>
>
# * Sun's "Javadoc API Reference Documentaiton for Blu-ray Disc # Application Development", available from # http://java.sun.com/javame/reference/bluray-technote.html
 # # 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,
Line: 104 to 84
 # BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar . Copy this file into # the originals directory. #
Changed:
<
<
# Now, get a copy of the GEM 1.0.3 stubs for the packaged media target. # They'll be in a file called gem_packaged_media.rar ; copy this into # the originals directory. It's stored in a "RAR" archive, and many computers # don't have a command-line unrar tool built in, so you'll have to unpack the # archive manually. On Mac, I use a program called "UnRarX", but many other # free unrar programs are also available. In the originals directory, remove # any previous version of the directory called gem_packaged_media that might # exist, and then run your unrar program on gem_packaged_media.rar (e.g. # by double-clicking on the file). You should now see a directory called # gem_packaged_media. # # Get a copy of the Java TV API 1.1_01 source RI and documentation. # You'll get a file called jtv-1_1_01-src-doc.zip ; copy this into the # originals directory. Similarly, the Java TV API 1.1_01 binary reference # implementation and documentation comes in a file called # jtv-1_1_01-bin-doc.zip; copy this into the originals directory, too. # # Finally, get a copy of the "fake" PBP and JSSE stubs source code from # hdcookbook.com. They'll be in a file called fake_stubs_pbp_jsse.zip ; # copy this 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 http://www.mhp.org/mhpgem10.htm . # They'll be in a file called mug226-gem_packaged_media.zip ; 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 # http://java.sun.com/javame/reference/bluray-technote.html . # Download the four zip files to the originals direcory. The four # files are "Java TV API (JSR 927)" in jtv111.zip, "Java Secure Socket # Extension (JSSE) 1.0.3 for CDC 1.0.2" in jsse103.zip, "Foundation # Profile (FP) and Connected Device Configuration (CDC), version # 1.0b" in fp10b.zip, and "Personal Basis Profile (PBP), version 1.0b # in pbp10b.zip. Your originals directory should now have these files: # # BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar # fp10b.zip # jsse103.zip # jtv111.zip # mug226-gem_packaged_media.zip # pbp10b.zip #
 # # # That's it! You've now assembled all of the pieces. Now, just bring up
Line: 136 to 118
 # and javadoc.

#

Changed:
<
<
# First, do the interactive profile. We start by unpacking all of # the source...
>
>
# First, we unpack all of the source.
 # rm -rf tmp mkdir tmp
Line: 146 to 127
 cd bda unzip ../../originals/BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar cd ..
Changed:
<
<
unzip ../originals/fake_stubs_pbp_jsse.zip unzip ../originals/jtv-1_1_01-src-doc.zip mkdir gem cp -r ../originals/gem_packaged_media/interactive/src/org gem/org unzip jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip rm jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip rm jtv-1_1_01-doc.zip unzip ../originals/jtv-1_1_01-bin-doc.zip mkdir jtv-binary cd jtv-binary mkdir tmp cd tmp unzip ../../jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip cd .. unzip tmp/javatv.jar rm -rf tmp com sun rm javax/media/protocol/URLSourceStream.class # package-private class cd .. rm jtv-1_1_01-doc.zip rm jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip
>
>
unzip ../originals/fp10b.zip unzip ../originals/jtv111.zip unzip ../originals/pbp10b.zip unzip ../originals/jsse103.zip unzip ../originals/mug226-gem_packaged_media.zip
 #
Changed:
<
<
# Now, still on the interactive profile, we compile the stubs. For Java TV, # the source code has implementation in it, so we don't compile Java TV; # instead, we copy the Java TV class files out of the binary reference # implementation.
>
>
# Now we compile the interactive profile stubs. We're currently in the # tmp directory. #
 rm -rf ../interactive mkdir ../interactive mkdir classes
Changed:
<
<
cp -r jtv-binary/javax classes/javax
>
>
GEM=mug226-gem_packaged_media/gem_packaged_media/interactive/src
 javac -bootclasspath classes -d classes -source 1.3 -target 1.3
Changed:
<
<
-sourcepath fake_stubs_pbp_jsse:gem:bda `find fake_stubs_pbp_jsse -name '*.java' -print` `find gem -name '*.java' -print`
>
>
-sourcepath fp10b:pbp10b:jsse103:jtv111:$GEM:bda `find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jsse103 -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print`
  `find bda -name '*.java' -print` cd classes zip -r ../../interactive/classes.zip *
Line: 188 to 157
 mkdir ../interactive/html javadoc -bootclasspath ../interactive/html -d ../interactive/html -source 1.3
Changed:
<
<
-sourcepath fake_stubs_pbp_jsse:javatv1.1_01/src/share/jmflite/classes:javatv1.1_01/src/share/javatv/classes:gem:bda `find fake_stubs_pbp_jsse -name '*.java' -print` `find javatv1.1_01/src/share/jmflite/classes/javax -name '*.java' -print` `find javatv1.1_01/src/share/javatv/classes/javax -name '*.java' -print` `find fake_stubs_pbp_jsse -name '*.java' -print` `find gem -name '*.java' -print`
>
>
-sourcepath fp10b:pbp10b:jsse103:jtv111:$GEM:bda `find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jsse103 -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print`
  `find bda -name '*.java' -print`
Deleted:
<
<
cd .. rm -rf tmp
 # #
Changed:
<
<
# Now, we do the same thing for the enhanced profile. This is copy-paste of # the above, but we also remove JSSE, and grab the GEM enhanced profile.
>
>
# 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"). # #
Deleted:
<
<
pwd mkdir tmp cd tmp mkdir bda cd bda unzip ../../originals/BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar cd .. unzip ../originals/fake_stubs_pbp_jsse.zip # Remove JSSE: rm -rf fake_stubs_pbp_jsse/javax/net fake_stubs_pbp_jsse/javax/security unzip ../originals/jtv-1_1_01-src-doc.zip mkdir gem cp -r ../originals/gem_packaged_media/enhanced/src/org gem/org unzip jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip rm jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip rm jtv-1_1_01-doc.zip unzip ../originals/jtv-1_1_01-bin-doc.zip mkdir jtv-binary cd jtv-binary mkdir tmp cd tmp unzip ../../jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip cd .. unzip tmp/javatv.jar rm -rf tmp com sun rm javax/media/protocol/URLSourceStream.class # package-private class cd .. rm jtv-1_1_01-doc.zip rm jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip

# # Now, to finish the enhanced profile, we compile the stubs. For Java TV, # the source code has implementation in it, so we don't compile Java TV; # instead, we copy the Java TV class files out of the binary reference # implementation.

 rm -rf ../enhanced mkdir ../enhanced mkdir classes
Changed:
<
<
cp -r jtv-binary/javax classes/javax
>
>
GEM=mug226-gem_packaged_media/gem_packaged_media/enhanced/src
 javac -bootclasspath classes -d classes -source 1.3 -target 1.3
Changed:
<
<
-sourcepath fake_stubs_pbp_jsse:gem:bda `find fake_stubs_pbp_jsse -name '*.java' -print` `find gem -name '*.java' -print`
>
>
-sourcepath fp10b:pbp10b:jtv111:$GEM:bda `find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print`
  `find bda -name '*.java' -print` cd classes zip -r ../../enhanced/classes.zip *
Line: 258 to 192
 mkdir ../enhanced/html javadoc -bootclasspath ../enhanced/html -d ../enhanced/html -source 1.3
Changed:
<
<
-sourcepath fake_stubs_pbp_jsse:javatv1.1_01/src/share/jmflite/classes:javatv1.1_01/src/share/javatv/classes:gem:bda `find fake_stubs_pbp_jsse -name '*.java' -print` `find javatv1.1_01/src/share/jmflite/classes/javax -name '*.java' -print` `find javatv1.1_01/src/share/javatv/classes/javax -name '*.java' -print` `find fake_stubs_pbp_jsse -name '*.java' -print` `find gem -name '*.java' -print`
>
>
-sourcepath fp10b:pbp10b:jtv111:$GEM:bda `find fp10b -name '*.java' -print` `find pbp10b -name '*.java' -print` `find jtv111 -name '*.java' -print` `find $GEM -name '*.java' -print`
  `find bda -name '*.java' -print`
Added:
>
>
# # All done! #
 cd .. rm -rf tmp
Line: 290 to 227
 

-- Main.billf - 17 Sep 2008 \ No newline at end of file

Added:
>
>
-- Main.billf - 18 Oct 2008
 \ No newline at end of file

 <<O>>  Difference Topic BDJPlatformDefinition (2 - 17 Sep 2008 - Main.billf)
Line: 1 to 1
 
META TOPICPARENT name="Blu-RayDisc"
Added:
>
>
 

Getting a BD-J Platform Definition

For a Java developer to develop BD-J applications, they must be able to read the API documentation


 <<O>>  Difference Topic BDJPlatformDefinition (1 - 17 Sep 2008 - Main.billf)
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="Blu-RayDisc"

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 "classes.zip" 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 http://hdcookbook.com/bdj_platform/build.sh, 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.

Platform Definition shell script

Here's the shell script that you can use to assemble a BD-J platform definition:

#!/bin/sh
#
#		BD-J Platform Definition
#		Bill Foote, bill.foote@sun.com, billf@jovial.com
#		Sept. 16, 2008
#
#  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.
#
#  Certain of the Sun pieces aren't yet available as "stubs source code",
#  that is, Java source code that does not include meaninful method
#  implementations.  These are in the process of being published in Sun.
#  In the meantime, it is possible to download the reference implementation
#  of the Sun technologies in question.  These reference implementations
#  might have documentation that is slightly out of date with recent
#  specification bugfixes, but it is extremely close, and in all important
#  aspects it is adequate for BD-J development.  It's also much better than
#  other approximations available, such as using the implementation of a
#  PC-based BD-ROM player (which might contain a superset of the minimum
#  required BD-J APIs).  For now, we recommend the approach outlined in this
#  document; as the stubs source code from Sun becomes available, this document
#  will be amended (and simplified!).
#
#  You will need to obtain:
#
#     *  The BD-J JavaDocStubs, available from the Blu-ray Disc
#	 association.  An application can be found at
# 	 http://blu-raydisc.info/license_app/javadocstubs_apps.php.
#
#     *  The GEM Stubs for Packaged Media Target (GEM 1.0.3) (August 2008),
#	 available from http://www.mhp.org/mhpgem10.htm
#
#     *  The Java TV API 1.1_01 Source RI and Documentation, available
#	 from http://java.sun.com/products/javatv/ .
#
#     *  The Java TV API 1.1_01 Binary Reference Implementation and
#	 Documentation, available from http://java.sun.com/products/javatv/
#
#     *  Source code for the other Sun components, Personal Basis Profile 
#	 1.0 and JSSE for CDC 1.0.  Sun is preparing a download of these
#	 components (which will also include Java TV), but this probably
#	 won't be ready before October 2008.  In the meantime, you can get
#	 a copy of "fake" stubs that contain the correct API signatures, but
#	 that have had the API element descriptions replaced with a disclaimer.
#	 This can be downloaded from 
#	  http://hdcookbook.com/bdj_platform/fake_stubs_pbp_jsse.zip.
#
#  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 GEM 1.0.3 stubs for the packaged media target.
#  They'll be in a file called gem_packaged_media.rar ; copy this into
#  the originals directory.  It's stored in a "RAR" archive, and many computers
#  don't have a command-line unrar tool built in, so you'll have to unpack the
#  archive manually.  On Mac, I use a program called "UnRarX", but many other
#  free unrar programs are also available.  In the originals directory, remove
#  any previous version of the directory called gem_packaged_media that might
#  exist, and then run your unrar program on gem_packaged_media.rar (e.g.
#  by double-clicking on the file).  You should now see a directory called
#  gem_packaged_media.
#
#  Get a copy of the Java TV API 1.1_01 source RI and documentation.
#  You'll get a file called jtv-1_1_01-src-doc.zip ; copy this into the
#  originals directory.  Similarly, the Java TV API 1.1_01 binary reference
#  implementation and documentation comes in a file called
#  jtv-1_1_01-bin-doc.zip; copy this into the originals directory, too.
#
#  Finally, get a copy of the "fake" PBP and JSSE stubs source code from
#  hdcookbook.com.  They'll be in a file called fake_stubs_pbp_jsse.zip ;
#  copy this into the originals directory.
#
#
#  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 build.sh
#
#  The shell script relies on a few very common programs:  unzip, zip, javac, 
#  and javadoc.

#
# First, do the interactive profile.  We start by unpacking 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/fake_stubs_pbp_jsse.zip
unzip ../originals/jtv-1_1_01-src-doc.zip
mkdir gem
cp -r ../originals/gem_packaged_media/interactive/src/org gem/org
unzip jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip
rm jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip
rm jtv-1_1_01-doc.zip
unzip ../originals/jtv-1_1_01-bin-doc.zip
mkdir jtv-binary
cd jtv-binary
mkdir tmp
cd tmp
unzip ../../jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip
cd ..
unzip tmp/javatv.jar
rm -rf tmp com sun
rm javax/media/protocol/URLSourceStream.class    #  package-private class
cd ..
rm jtv-1_1_01-doc.zip
rm jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip

#
# Now, still on the interactive profile, we compile the stubs.  For Java TV,
# the source code has implementation in it, so we don't compile Java TV;
# instead, we copy the Java TV class files out of the binary reference
# implementation.
rm -rf ../interactive
mkdir ../interactive
mkdir classes
cp -r jtv-binary/javax classes/javax
javac -bootclasspath classes -d classes -source 1.3 -target 1.3 \
	-sourcepath fake_stubs_pbp_jsse:gem:bda \
	`find fake_stubs_pbp_jsse -name '*.java' -print` \
	`find gem -name '*.java' -print` \
	`find bda -name '*.java' -print`
cd classes
zip -r ../../interactive/classes.zip *
cd ..
rm -rf classes
mkdir ../interactive/html
javadoc -bootclasspath ../interactive/html -d ../interactive/html \
	-source 1.3 \
	-sourcepath fake_stubs_pbp_jsse:javatv1.1_01/src/share/jmflite/classes:javatv1.1_01/src/share/javatv/classes:gem:bda \
	`find fake_stubs_pbp_jsse -name '*.java' -print` \
	`find javatv1.1_01/src/share/jmflite/classes/javax -name '*.java' -print` \
	`find javatv1.1_01/src/share/javatv/classes/javax -name '*.java' -print` \
	`find fake_stubs_pbp_jsse -name '*.java' -print` \
	`find gem -name '*.java' -print` \
	`find bda -name '*.java' -print`

cd ..
rm -rf tmp

#
#
#  Now, we do the same thing for the enhanced profile.  This is copy-paste of
#  the above, but we also remove JSSE, and grab the GEM enhanced profile.
#  ("Enhanced" is the GEM term for "without connection to the Internets").
#
#

pwd
mkdir tmp
cd tmp
mkdir bda
cd bda
unzip ../../originals/BD-ROM_Part3-2_v3.4_javadoc_080623-src-stubs.jar
cd ..
unzip ../originals/fake_stubs_pbp_jsse.zip
#  Remove JSSE:
rm -rf fake_stubs_pbp_jsse/javax/net fake_stubs_pbp_jsse/javax/security
unzip ../originals/jtv-1_1_01-src-doc.zip
mkdir gem
cp -r ../originals/gem_packaged_media/enhanced/src/org gem/org
unzip jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip
rm jtv-1_1_01-rr-src-b02-linux-x86-24_apr_2006.zip
rm jtv-1_1_01-doc.zip
unzip ../originals/jtv-1_1_01-bin-doc.zip
mkdir jtv-binary
cd jtv-binary
mkdir tmp
cd tmp
unzip ../../jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip
cd ..
unzip tmp/javatv.jar
rm -rf tmp com sun
rm javax/media/protocol/URLSourceStream.class    #  package-private class
cd ..
rm jtv-1_1_01-doc.zip
rm jtv-1_1_01-rr-bin-b02-linux-x86-12_may_2006.zip

#
# Now, to finish the enhanced profile, we compile the stubs.  For Java TV,
# the source code has implementation in it, so we don't compile Java TV;
# instead, we copy the Java TV class files out of the binary reference
# implementation.
rm -rf ../enhanced
mkdir ../enhanced
mkdir classes
cp -r jtv-binary/javax classes/javax
javac -bootclasspath classes -d classes -source 1.3 -target 1.3 \
	-sourcepath fake_stubs_pbp_jsse:gem:bda \
	`find fake_stubs_pbp_jsse -name '*.java' -print` \
	`find gem -name '*.java' -print` \
	`find bda -name '*.java' -print`
cd classes
zip -r ../../enhanced/classes.zip *
cd ..
rm -rf classes
mkdir ../enhanced/html
javadoc -bootclasspath ../enhanced/html -d ../enhanced/html \
	-source 1.3 \
	-sourcepath fake_stubs_pbp_jsse:javatv1.1_01/src/share/jmflite/classes:javatv1.1_01/src/share/javatv/classes:gem:bda \
	`find fake_stubs_pbp_jsse -name '*.java' -print` \
	`find javatv1.1_01/src/share/jmflite/classes/javax -name '*.java' -print` \
	`find javatv1.1_01/src/share/javatv/classes/javax -name '*.java' -print` \
	`find fake_stubs_pbp_jsse -name '*.java' -print` \
	`find gem -name '*.java' -print` \
	`find bda -name '*.java' -print`

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 "classes.zip" and the directory "html" respectively.'
echo ""
echo "You can refer to the HTML documentation, and you can use the classes.zip"
echo "file to compile BD-J applications, either using"
echo '"javac -bootclasspath classes.zip" or by configuring your IDE'
echo "appropriately."
echo ""
echo ""

# End of build.sh

-- Main.billf - 17 Sep 2008


Topic BDJPlatformDefinition . { View | Diffs r8 < r7 < r6 < r5 | More }
 XML java.net RSS