The RADi runtime library

  Applets and Java Web Start
  Error messages
  Location of radirt.jar

Why does RADi have a runtime library?
The runtime library (radirt.jar) contains RADI's unique LayoutManager, custom Beans like FolderPanel, Mover and SelfResizingTable (and about 20 more). The runtime library processes the layout definition file and creates the UI, so the UI code (which might be rather large) doesn't need to be contained in your source code files. Additionaly it executes listeners, event and property handlers.

The link between your application and the RADi runtime library (radirt.jar) is the RadiLoader class.
It has three static overloaded methods to be called from the constructor of exported layout classes (with, at least, the class and the layout definition file's name as arguments):
loadObjects(Object target, String fn)
loadObjects(Object target, String fn, boolean silent)
loadObjects(Object target, String fn, Locale locale)

Examples:
RadiLoader.loadObjects(this, "test.radi");
Makes RadiLoader process the layout definition file. The startup message, missing member declarations and missing resources will be reported via System.out. Exceptions occuring while executing listeners, event or property handlers will be reported via System.err. This is the method called by by default from the constructor of RADi-generated classes.

RadiLoader.loadObjects(this, "test.radi", true);
Makes RadiLoader process the layout definition file in silent mode. Only fatal errors which will prevent the application from further execution will be reported..

RadiLoader.loadObjects(this, "test.radi", new Locale("fr", "CA"));
Sets the default locale to french(Canada), then makes RadiLoader process the layout definition file.
Warning: Call this variant only for testing internationalization with different locales but not for a public release.

Note: You find the complete Javadoc documentation describing the runtime library at .../RADi/javadocs.


Applets and Java Web Start     Top of page

With unsigned applets, there are two restrictions:
Fields and methods of the exported class (and of exported inner classes) must be declared public, else you will see a java.security.AccessControlException. (The required permission is java.lang.reflect.ReflectPermission "suppressAccessChecks")
Note: This is true even for (RADi-generated) dialogs used by the applet.
You cannot call the RadiLoader method that specifies a locale, because an unsigned applet is not allowed to change the locale. (The required permission is: java.util.PropertyPermission "user.language", "write")

With signed applets there are no restrictions.

Because the RADi runtime does some reflection, you will have to sign all your JARs when deploying your application with Java Web Start.

Keep in mind, that the RADi runtime requires Java 1.4. Your applets need the appropriate browser plug-in and your JNLP file should define a j2se version of 1.4+.


Error messages     Top of page

The following errors will force RadiLoader to give up:
If RadiLoader could not find the layout definition (.radi) file , you will see this error message:
Possible reasons are:
You deleted or renamed the layout definition file or you moved it to a directory which is not in the class path.
If you try to run an applet, make sure that the layout definition file is located at the applet's code base (for local testing this is the project directory).
If you try to run a JAR file, the layout definition file might not be included in the JAR.
RadiLoader detected a version conflict. You should update to the latest RADi version.
RadiLoader could not find a custom Bean's JAR file.
Possible reasons are:
Class path settings do not include the missing JAR file.
If you try to run an applet, include the JAR file's name in the ARCHIVE tag and make sure that the JAR file is located at the applet's code base.
If you try to run a JAR file, the missing JAR should be referenced in the manifest file with the Class-Path option.
You missed to extend an abstract inner class. You should extend it and implement all abstract methods.

An error might occur if you trigger an event (press a button, for example) which is forwarded to a non-existent method. The layout definition file and the class file are out of sync. You should reexport the layout.
This error allows RADi to continue.

Note: For missing member declarations or missing resources, the RADi runtime prints a warning message to System.err. (You can suppress these warnings by calling RadiLoader.loadObjects() with a third argument of true.)


Location of radirt.jar     Top of page

Every exported layout class needs to find radirt.jar in the class path.
On a development machine you might copy it to the lib/ext folders of your JSDK and JRE installations.
If you design applets with RADi, radirt.jar has to be in the project directory (which is the applet's code base for local testing).
Packaged applications need to reference radirt.jar in their manifest file.