We have a simple Java test application for which the source
code is stored in a file called 'Test.java'. The contents of
this file is as follows:
publicclass Test
{
staticpublicvoid main(String[] Args)
{
Test ATest = new Test();
ATest.run();
}
publicvoid run()
{
System.out.println("Before calling the world of C!");
// Basically, under buggy machines the call into the WorldOfC
// function will crash the program with a segmentation fault.
WorldOfC();
System.out.println("After calling the world of C!");
// If the program makes it to here okay, the environment is
// valid.
}
static
{
System.loadLibrary("test");
}
privatenativeint WorldOfC();
}