JNI (Java Native Interface) library to get the current working directory from which the
JVM (Java Virtual Machine) was invoked.


The project shows how to create and use an own native method from within Java, using the JNI.

In very short only three (main) steps are needed for the implementation

1. write a Java class which declares a native method
2. generate a C/C++ header file from the Java class file
3. write a C/C++ library which implements the method

After compiling the library you're done and able to use it.

For a more detailed explanation and instructions see the files in this project.


* the included tests demonstrate that the Java system property "user.dir" is not a one hundred percent
reliable source to get the JVM invocation directory

source repository: