This section describes how the PJES source code is organized.
The top-level directory contains a few important sub-directories: build and src. The build directory contains the build scripts and makefiles for building the two sample implementations of the PJAE. src contains the Java and native source code for the PJAE.
The top-level directory contains two main sub-directories:
Directory | Description |
---|---|
build | Contains scripts and makefiles for building the PJAE. |
install | The target directory for building versions of the PJEE. |
jck | Available separately. Contains source code and scripts for the PJCK. |
src | Contains the source code for the PJES. |
The build hierarchy contains a set of shared and platform-dependent makefiles for building the PJAE on a target development environment. Its design serves two purposes:
The PJES build environment's flexibility is based on its reliance on a single, portable make utility.
Directory | Description |
---|---|
docs | Built separately. Contains javadoc generated HTML files for the PersonalJava class library. These HTML pages are built with the gnumake javadoc build command, and cover both application-level APIs and internal APIs like Truffle. |
share/makefiles | Contains platform-independent makefiles for various build targets. |
platform | Contains main platform-dependent makefile, support scripts and libraries. Build commands for the PJES build environment must be run from this directory. |
platform/makefiles | Contains platform-dependent makefiles for various build targets. |
The src hierarchy contains the PJES source code. The source code directories in src use both the JDK 1.1 and the newer JDK 1.2 systems of organization.
Directory | Description |
---|---|
share | share contains platform-independent source code. The Java and C source code in this hierarchy can be used for reference purposes but cannot be modified while porting the PJAE. |
platform | There are two platform directories included with the PJES: solaris for Solaris and win32 for Microsoft Windows 95/NT. These directories contain the platform-dependent source code for both the PersonalJava class library and the virtual machine. They are described together because they have almost identical structures. |
reference | Source code and resource files for the Truffle look & feel design classes. |
The PJES includes a virtual machine implementation that is divided between platform-independent source code in src/share/java/runtime and platform-dependent source code src/platform/java/runtime. See Virtual Machine Source Files for more details about the virtual machine source code.
The PJES includes a Java class library with a group of namespace hierarchies: java.*, sun.* and com.sun.*. The location of the source directories for these parts of the Java class library are described in the tables below. The organization of these source directories is based on the organization of the packages themselves. For example, src/share/com/com/sun contains three sub-directories for each package in the com.sun namespace: awt, lang and util.
./classes/sun/awt/touchable: ./lib: touchable.palettes The files in the reference hierarchy contain the implementation of the Touchable look & feel.
Directory | Description |
---|---|
classes/sun/awt/touchable | Java source code for the Touchable look & feel. |
lib | Database containing RGB values for named color palettes for the Touchable look & feel. |
The files in the share hierarchy contain the bulk of the PJES source code. This is the platform-independent part of the PJAE implementation. These source files are made available for reference purposes and cannot be changed while porting the PJAE to a target RTOS.
Directory | Description | |
---|---|---|
com/com/sun | Implementation of the com.sun.* namespace hierarchy. These classes are platform-independent and intended for use on non-PersonalJava application environments. A separate distribution of these classes is available for software developers who want to run Java programs on non-PersonalJava application environments like JDK 1.1.x. | |
classes/sun/awt | Java code. | Platform-independent Truffle classes. |
native/sun/awt | Native methods. | |
doc | Documentation and release notes. | |
java/java | Java code. | Platform-independent part of the implementation of the java.* namespace hierarchy. |
java/* (remaining directories) | Native methods. | |
java/runtime | Platform-independent part of the virtual machine. | |
java/include | ||
jcc | JavaCodeCompact tool. | |
lib | Platform-independent property files. | |
optional | Alternate implementations for optional components of the PJAE. | |
sun/sun | Java code. | Platform-independent part of the implementation of the sun.* namespace hierarchy. |
sun/* (remaining directories) | Native methods. | |
sun/sun/pjava | Java code. | PersonalJava-specific part of the sun.* namespace hierarchy. |
sun/pjava | Native methods. | |
sun/sun/misc | Miscellaneous classes, including sun.misc.VM, the virtual memory state notification system. | |
sun/sun/tools | Tool classes, including the debug agent, jar and low-level Java classes. | |
sun/jdc | JavaDataCompact tool. | |
tools | Miscellaneous tools, including the platform-independent part of hprof. |
The files in the platform hierarchy contain the platform-dependent source code. This is where most of the porting work is done.
Directory | Description | |
---|---|---|
bin | Invocation utilities for the PersonalJava interpreter and applet viewer. For Solaris, these are implemented with shell scripts; for Microsoft Windows 95/NT, they are implemented with C source files. | |
classes/sun/awt/platform | Java code. | Truffle graphics portability layer. |
native/sun | Native methods. | |
java/java | Java code. | Platform-dependent part of the implementation of the java.* namespace hierarchy. |
java/* (remaining directories) | Native methods. | |
java/runtime | Platform-dependent part of the virtual machine. | |
java/include | ||
java/green_threads (Solaris only) | Green threads implementation. | |
java/native_threads (Solaris only) | Native threads implementation. | |
java/javai (Solaris only) | Platform-dependent entry point to the Java interpreter. | |
java/main (Microsoft Windows 95/NT only) | ||
lib | Platform-dependent property files. | |
mmedia | Native methods. | sun.audio. |
sun/sun | Java code. | Platform-dependent part of the implementation of the sun.* namespace hierarchy. |
sun/* (remaining directories) | Native methods. | |
tools | Miscellaneous tools, including the platform-dependent part of hprof. |