JEVM Tests
These tests are all available in the public domain. You can run all the tests on all DSK platforms, with a few exceptions. The recommended environment variable setup is as follows:
Include c:\fadata\jevm\bin and c:\jdk1.6.0\bin (your Java installation folder) in the PATH.
JEVM_DIR=c:/fadata/jevm.
TI_DIR=c:/CCStudio_v3.12 (your CCS installation folder).
CLASSPATH=c:/fadata/jevm/java; c:/fadata/jevm/java/Bytecodes;c:/fadata/jevm/java/JNI;
c:/fadata/jevm/java/Misc;c:/fadata/jevm/java/Reflection;
c:/fadata/jevm/java/Threads;c:/fadata/jevm/java/ZMachine
LIBPATH=c:/fadata/jevm/dsk/dskXXXX (where XXXX is 5510, 6416, 6455, 6711 or 6713)
Note: be cautious not to exceed 200 characters length for the CLASSPATH variable. The TI library function getenv() uses a static buffer of 200 bytes for any environment variable, and overrunning this buffer may be catastrophic for JEVM.
JEVM should be run using the corresponding batch file (we will use the jevm6416.bat as an example):
- jevm5510.bat for DSK5510
- jevm6416.bat for DSK6416
- jevm6711.bat for DSK6711
- jevm6713.bat for DSK6713
Blink
This is the only DSK-dependent test. It does have two parts - target and host.
Execute jevm6416
Leds to run the target side of the test. Wait for a message to appear at the console window.
At another CommandPrompt window set
CLASSPATH=c:/fadata/jevm/JNI
execute
java Blink
to run the host side of the test. A graphical window will appear, showing the status of the user switches and the LEDs. Now you can click on LED buttons to make LEDS on board on and off. You can also change board switch positions to see their status reflected in the window.
The interesting thing about this test is that JEVM loads the corresponding native methods (that can be seen in the file Leds.c) dynamically on request by the target side Java application Leds.java.
Note: for all DSKs except DSK6711 there are 4 switches and 4 LEDs that can be independently set on and off. For DSK6711 there are only 3 switches and 3 LEDs and the behavior of the test is slightly different.
Bytecodes
Execute
jevm6416 TestAll
or
jevm6416 TestXxxxx
to execute the whole test or any individual test from c:/fadata/java/Bytecodes directory.
dhrystone
Execute
jevm6416 dhrystone.dhry
The test will run long time.
whetstone
Execute
jevm6416 whetstone.whet
The test will run long time.
JNI
Execute one or all of these:
- jevm6416 Allocation
- jevm6416 ArgumentPassing
- jevm6416 ArrayFunctions
- jevm6416 ClassQuery
- jevm6416 CriticalCopy
- jevm6416 FieldAccess
- jevm6416 Mangled_Name_s_
- jevm6416 MethodInvocation
- jevm6416 MonitorTest
- jevm6416 NativeException
- jevm6416 StringFunctions
- jevm6416 tNative
- jevm6416 t3GT3 3 50 10 3 1000
These tests all use dynamically loaded JNI methods, found in the .c files with the same name in the JNI directory. The last test can have different arguments that may be read in the text of the .java file.
Misc
Execute one or all of these:
jevm6416 Linpack
A benchmark test.
jevm6416 Tak 100
Another benchmark test.
jevm6416 Sieve
Erathostenes Sieve test.
jevm6416 SocketTest
A test for JEVM socket interfaces.
Copy some .html file in the current directory of your CommandPrompt Window.Execute
jevm6416 WebServer
Now you can activate your Internet browser and give the following URL to it:
http://localhost:8080/xxx.html
where xxx.html is the name of the HTML file you have copied. The browser will display the file.
Reflection
Execute one or all of these:
jevm6416 tArray
jevm6416 tClass
jevm6416 tField
jevm6416 tInstance
jevm6416 tNewInstance
The Load.java program is a sample application loader that allows you to specify the full pathname of other Java class file to execute with optional arguments. The usage of such application loader makes it possible for the JEVM to unload classes (and native libraries as well) after they have finished their work and the application loader has been found collectable by the garbage collector. The syntax to use Load is like this:
jevm6416 Load c:/somepath/Test arg1 arg2 ...
Where c:/somepath is the absolute path of the Java class file to load and execute.
Reflection
Execute one or all of these:
jevm6416 TestBackEdgeGC
jevm6416 TestDispatch
jevm6416 TestInterruptAndSpin
jevm6416 TestInterruptedSleep
jevm6416 TestInterruptedWait
jevm6416 TestNotification
jevm6416 TestTimedWait
jevm6416 TestTimeSlicing
jevm6416 TestVolatiles
ZMachine
Change directory to c:/fadata/java/ZMachine/ZCodeGames. Each game test is executed by:
jevm6416 Zax xxx.z5
where xxx.Z5 is the name of the game. For example:
jevm6416 Zax Advent.Z5
will give you the opportunity to enjoy the famous Adventure game.
Note: Adventure is too large to work on DSK5510.
babylon
This is a shareware Java Chat application. For more information visit Babylon Chat. You will need two more command Windows.
Make sure c:/fadata/jevm/babylon is in your CLASSPATH.
Change directory to c:/fadata/jevm/babylon. Execute
jevm6416 babylonServer -nographics
to activate the chat server controlled by JEVM. The server will display messages to denote it is waiting for connection. At another CommandPrompt window change directory to
c:/fadata/jevm/java/babylon
set CLASSPATH to . Execute
java babylon
to activate the chat client application. Register with username and password. At another CommandPrompt window change directory to
c:/fadata/jevm/java/babylon
set CLASSPATH to . Execute
java babylon
to activate the chat client application. Register with username and password. Now you can chat between these client windows. You can start more client sessions.
Note: You can access the chat room from another machine, specifying its name at the client connection setup.


