![]() | [using it] | Interface Manipulation Package v4.0 (2008-06-25) | ![]() | ©copyright | ![]() |
About Java | ||
Java is well-formalized (as an object-oriented language), safe to use (regarding security and programmer bugs), portable (running
everywhere),
full of a lot of tools (graphic user interface, data structures), easy to learn, free to obtain.
|
Installation of the Java environment (Linux or other UniX operating systems) | ||
Download the JDK 5.0 or J2SE 5.0:
-installing the JDK or the JRE is done via a command of the form: rpm -Uvh jdk-1_5_0-linux-i586.rpm
-linking the plug-in for mozilla is done via a command of the form: ln -s /usr/java/jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so $MOZILLA/plugins
where $MOZILLA is either /usr/lib/mozilla or your local $HOME/.mozilla directory (you may have to mkdir $HOME/.mozilla/plugins)
- installing the imp-ext.jar as a Java extension is done via a command of the form:
cp imp-ext.jar /usr/java/jdk1.5.0/jre/lib/ext
|
Installation of the Java environment (Mac OsX) | ||
Mac OS X delivers Java 2, including a developer connection
and is now running Java1.5 as soon as at least the Mac OS 10.4 is installed.
|
Using the Java 3D viewer in this bundle | ||
We propose a simple 3D viewer based on Java 3D
assuming that all 3D elements are defined using the Java 3D API.
The Java 3D extension must be downloaded and installed.
For the Linux platform installing the Java3D extension is done via a command of the form: cd /usr/java/jdk1.5.0 ; sh .../java3d-sdk-1.3.1-linux-i386.bin
Clearly, 3D elements could have been defined in XML: this a challenge for the W3C.
|
Using the SVG static viewer in this bundle | ||
|
Shared CVS source co-development | ||
The present implementation is an open-source bundle of Java and XML files in
a CVS server archive, obtained via the command:
cvs -d :ext:$USER@taquilee.inria.fr:/proj/odyssee/home/CVS co Ogygie/Softwares/Imp
You must chown a+w /usr/java /usr/java/jdk1.5.0/jre/lib/ext or have a local java installation in order to be able to compile the imp bundle.
All commands to build/manage the source bundle are defined in the makefile: e.g. make -s -C Ogygie/Softwares/Imp/imp/tools usage.
External tools
(java-tools, saxon, JDK documentation)
are also installed via this makefile, while the Java 3D or SVG static viewers may be also required.
|
Interfacing Java with other languages | ||
The present Java code is compilable using GCJ but Java 1.5 source code compatibility is still expected.
|
Hint: applet deployment | ||
In practice, it appears better to define applets via the <applet
.. > tags than using <object .. >, browsers compatibility being better.
The Java(TM) Plug-in must be installed.
A typical definition is of the form:
<applet code="imp.gui.IApplet" archive="http://.../imp.jar" width="400" height="300"><param name=".." value=".."/>../..</applet>
|
Hint: java-script interaction | ||
Here G.U.I. components and related applets
very easily interact with dynamic pages with embedded Java-script:
|
Hint: remote exception management | ||
Since we can defined:
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread t, Throwable e) {
../..
}});
it is easy to define mechanism to dump/send/trace exception in a remote application.
|