Project Notes


Project: The Borland Multilingual International Store
Description

The International Sample Application brings together the power and functionality of JBuilder's JavaBeans Component Library and DataBroker architecture into an internationally enabled, multi-lingual, on-line shopping application.

Getting Started...

Before running the application, please select Build | Rebuild Project "IntlDemo.jpr" to build all the necessary packages required by the application. Because this application uses JDK ResourceBundle classes, a 'rebuild' (as opposed to a 'build') is necessary to ensure that resources in subpackages are compiled. If you have tried to run the application without first doing a rebuild, a MissingResourceException will be thrown (check View | Execution log) and the application will not run.

Furthermore, the application assumes that you have installed JBuilder into a directory named '\JBuilder' off of the root directory of the current drive. If you have installed JBuilder to a directory name other than '\JBuilder' you will need to do the following:

  1. Display the list of files within the borland.samples.intl.application package by expanding that package node from within the navigation pane for this project.
  2. Click on the 'AppDataModule.java' file to load that file into the editor.
  3. From the menu, select Search | Replace.
  4. Enter '\\JBuilder' as the search value.
  5. Enter the directory name of your JBuilder installation (e.g., '\\MyJBuilder') as the replacement value.
  6. Select 'Replace All' and then 'All' to replace all occurrences of '\\JBuilder'.

Finally, you must add the '\JBuilder\myclasses' and '\JBuilder\samples' directories to the IDECLASSPATH variable defined in your JBuilder\bin\JBuilder.INI file in order to use the UI designer with any of the frames used in this application. Failure to do so will prevent JBuilder from locating the resource files it needs to display localized text within the designer. Note: Remember to exit from JBuilder before modifying your JBuilder.INI file.

After rebuilding all of the packages within this project, you may select Run | Run Applet in "IntlDemo.html" to run this sample as an applet, or select the "IntlDemo.java" file in the project's navigation pane and select Run | Run "IntlDemo" to run this sample as an application. When run as an applet, this sample uses the applet parameters defined within this .html file to make a connection to a database source. By default, the following JDBC parameters are used. If you have not already created an ODBC alias pointing to the \JBuilder\samples\borland\samples\application\data\IntlDemo.gdb Interbase database, you will need to do so in order to run this sample as an applet.

When running this sample as an application, you may specify the use of either a TextDataFile (the default setting) or JDBC database as the application's data source. To specify a JDBC database as the provider, you must pass JDBC connection information to the sample via command line parameters ( Run | Parameters | Command Line Parameters) as follows:

java IntlDemo url username password driver

Example:

java IntlDemo jdbc:odbc:IntlDemo SYSDBA masterkey sun.jdbc.odbc.JdbcOdbcDriver

Note that because the use of an ODBC driver requires loading a .DLL file installed on the client, you will not be able to run the sample as an applet via a browser (such as the JDK1.1 appletviewer) without using an 100% pure java JDBC driver (such as Interbase's InterServer/InterClient) on your web/database server.

Things to See and Do While Visiting The Borland Multilingual Store

  • WelcomeFrame
  • Note: You will only be able to view data from a particular locale if you have already installed the appropriate font for that locale and modified the corresponding entry in your JDK font.properties file.

    Summary of JBCL and DataBroker Functionality Used

  • JBCL components
  • Custom components
  • DataBroker functionality
  • JDK i18n functionality
  • Packages

    Package Name Description
    borland.samples.intl main project file and application launcher
    borland.samples.intl.application data module and supporting files; application execption handler
    borland.samples.intl.application.data TextDataFiles and Interbase database used by the sample
    borland.samples.intl.application.resources localized application resources
    borland.samples.intl.beans JavaBeans used in the application
    borland.samples.intl.beans.event event and event listener interface used by locale-sensitive beans
    borland.samples.intl.beans.resources resources (images and resourcing bundles) used by the beans
    borland.samples.intl.gui classes used to build the application's GUI
    borland.samples.intl.gui.resources resources (images and ResourceBundles) used by GUI elements
    borland.samples.intl.util a few utility classes
    borland.samples.intl.doc application documentation and source file javadoc