Technology Compatibility Kits (TCKs) are a required component of any Java Specification Request (JSR). Our goal is to provide such a TCK for SCJ. This is a work in progress, as is the specification. We aim to provide an open source testing framework for SCJ with a suite of tests for testing SCJ functionality. There is an initial release of these in the download page. In the future, a benchmarking suite will also be made available. Since timeliness is an integral part of safety critical programs, we believe that benchmarking is an important part of any TCK that could be developed for SCJ.


The RI and specification sources are not provided due to their confidential nature. However, they are required for compilation of the TCK. After extracting the TCK source from the download, one should add these sources under RI/ and spec/ directories, respectively. The javax/ directory, etc., should be directly under these (ie, no src/ folder, etc.)

A Makefile is provided for compilation. However, some modifications may be necessary to use with different virtual machines. Our main testing platform was the Sun Real-Time VM, but to compile on IBM's J9/WebSphere compiler, you must add -Xrealtime as a compile flag to detect RTSJ classes. The Makefile also assumes that the javac in the PATH is the desired compiler. The resulting class files our output to the bin directory.


To run all testcases in the TCK, a script is provided in the root directory of the distribution. Again, it assumes that the java in the PATH is a real-time VM.

To run a single testcase, you pass javax.safetycritical.S3Launcher as the main class, with the desired testcase and properties file as arguments. For example, to run the TestSchedule400 testcase: $ java -cp bin javax.safetycritical.S3Launcher s3scj.tck.TestSchedule400 properties/tck/TestSchedule400.prop

Code Coverage

We use EMMA for code coverage, but it is not included in the distribution. The steps to using EMMA are (assuming you have successfully compiled it):

1. Instrument the TCK and RI class files with EMMA: $ java -cp emma.jar emma instr -d instrbin -ip bin 2. Run the TCK normally, except add emma.jar to the CLASSPATH: $ java -cp instrbin:emma.jar \ javax.safetycritical.S3Launcher \ s3scj.tck.TestSchedule400 \ properties/tck/TestSchedule400.prop 3. Generate a text and HTML report with EMMA. The -sp option gives EMMA a source path for highlighting code coverage of blocks. $ java -cp emma.jar emma report -r txt,html -in coverage.em, -sp $RISRCPATH

Directory Structure

The TCK is arranged into several different directories:
  • bin/ Java class files.
  • doc/ Documentation files (readme, etc)
  • lib/ JNI C library sources
  • properties/ Property files for testcases
  • RICompl/ Complementary classes to the RI
  • src/ Contains s3scj Java package (TCK)