#include <gcj/cni.h>

#include <java/lang/System.h>
#include <java/io/PrintStream.h>

int main(int argc, char *argv[]) {
  using namespace java::lang;

  JvCreateJavaVM(NULL);
  JvAttachCurrentThread(NULL, NULL);
  JvInitClass(&System::class$);

  String *msg = JvNewStringUTF("Hello from C++");
  System::out->println(msg);

  JvDetachCurrentThread();
}

