RADE |
Multi-Workspace Application Builder |
mkmk and JavaHow mkmk organize Java modules |
Technical Article |
AbstractDistinction is being made to separate client code from server code inside the run time view. Note that from this level, all Java modules are now built using the Java 1.3 compiler. The proposal idea is to separate client run time view from server run time view. Java modules will be segregated in three categories: common modules, client modules and server modules.
The type of Java modules will be specified in the Imakefile.mk by using the new keyword TYPE. Possible values are CLIENT, SERVER or COMMON. A module without a TYPE specified will be automatically typed as CLIENT. Java modules are segregated in three categories: Client, Server and Common. To do this, a new key word TYPE is inserted in JAVA modules Imakefile.mk.
Hence, Mkmk build tools will generate three run time views: a common, a client and a server run time views. Client applications will have to concatenate the common and client run time view in their classpath while server applications will have to concatenate the common and server run time view. |
[Top]
BUILT_OBJECT_TYPE = JAVA and TYPE unspecified | /Workspace/$MkmkOS_Builtime/docs/java |
BUILT_OBJECT_TYPE = JAVA CLIENT | /Workspace/$MkmkOS_Builtime/docs/java |
BUILT_OBJECT_TYPE = JAVA and TYPE = CLIENT | /Workspace/$MkmkOS_Builtime/docs/java |
BUILT_OBJECT_TYPE = JAVA COMMON | /Workspace/$MkmkOS_Builtime/docs/java AND /Workspace/$MkmkOS_Builtime/docs/javaserver |
BUILT_OBJECT_TYPE = JAVA and TYPE = COMMON | /Workspace/$MkmkOS_Builtime/docs/java AND /Workspace/$MkmkOS_Builtime/docs/javaserver |
BUILT_OBJECT_TYPE = JAVA SERVER | /Workspace/$MkmkOS_Builtime/docs/javaserver |
BUILT_OBJECT_TYPE = JAVA and TYPE = SERVER | /Workspace/$MkmkOS_Builtime/docs/javaserver |
The Client/Server architecture implies some restrictions to the relations between Java modules at build time. In fact, Server and Client modules cannot be mixed, then mkmk will check the LINK_WITH directives from Imakefile.mk files.
Here are the authorized and forbidden relations between Java modules:
Authorized LINK_WITH are:
|
Forbidden LINK_WITH are:
|
Modules where BUILT_OBJECT_TYPE = CORBA are automatically typed as CLIENT.
The JAVA part of those modules will be generated in: /Workspace/$MkmkOS_Builtime/docs/java.
The target directory modification for CORBA modules is managed by mkmk without Imakefile.mk modification. Client/Server paradigm, which already exists for CORBA modules, is not related to the JAVA module TYPE (CORBA client code can be used by a server in order to communication to an out-process CORBA component).
[Top]
Since Java code is now separated in at least two run time views (common+client for client applications and common+server for server applications), application will have to update their classpaths in order to concatenate two run time views instead actually of one.
Even if not mandatory by this architecture it should be advised to also have Client frameworks only containing Client JAVA modules, same thing being done for Common and Server framework. This can greatly simplify packaging and avoid having client application CDRom containing server code that will be installed at the same time.
[Top]
It is possible to set some local Java compiler options in the Imakefile.mk with the keyword LOCAL_JAVA_FLAGS. Those options are used for all compiler levels. For example: "LOCAL_JAVA_FLAGS = -J-ms16m -J-mx96m".
The profile mkmk will detect the JDK 1.3 and export Java3ROOT_PATH and JRE3ROOT_PATH environment variables. Those two variables can be overwritten by setting _Java3ROOT_PATH and _JRE3ROOT_PATH (notes the leading underscore) prior to launch mkmk profile.
Notes that old environment variables Java2ROOT_PATH and JRE2ROOT_PATH are no more set. The Java compiler level 1.2 is no more used by mkmk, modules where BUILT_OBJECT_TYPE = JAVA2 are typed as SERVER and compiled with compiler level 1.3.
Default value for HP-UX:
Default value for AIX:
Default value for SunOS:
Default value for Windows 2000:
[Top]
Version: 1 [Jun 2003] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.