Hi, at the moment we have not a string datatype because it is variable lenght.
The string datatype would be good for an upper-level/higher-abstraction library...

You can send an string array as in the following example:

import mpi.*;

public class StringArray
{
public static void main(String[] args) throws MPIException
{
MPI.Init(args);
int rank = MPI.COMM_WORLD.getRank();
char buffer[] = new char[36];

if(rank == 0)
{
String[] array = { "Hello world!", "This is a bit tricky!" };
packStrings(array, buffer);
MPI.COMM_WORLD.send(buffer, buffer.length, MPI.CHAR, 1, 0);
}
else if(rank == 1)
{
MPI.COMM_WORLD.recv(buffer, buffer.length, MPI.CHAR, 0, 0);
String[] array = unpackStrings(buffer);

for(String s : array)
System.out.println(s);
}

MPI.Finalize();
}

private static void packStrings(String[] array, char[] buffer)
{
int offset = 0;
buffer[offset++] = (char)array.length;

for(String s : array)
{
buffer[offset++] = (char)s.length();
s.getChars(0, s.length(), buffer, offset);
offset += s.length();
}
}

private static String[] unpackStrings(char[] buffer)
{
int offset = 0,
count = buffer[offset++];
String array[] = new String[count];

for(int i = 0; i < count; i++)
{
int length = buffer[offset++];
array[i] = new String(buffer, offset, length);
offset += length;
}

return array;
}

} // StringArray