Skip to content


# GetDataRoot

VTKEx/Java/Utilities/GetDataRoot

### Description

vtkTesting object is a unified VTK regression testing framework.

Other languages

See (Cxx)

Question

If you have a simple question about this example contact us at VTKExProject If your question is more complex and may require extended discussion, please use the VTK Discourse Forum

### Code

GetDataRoot.java

    import vtk.vtkNativeLibrary;
    import vtk.vtkTesting;

    public class GetDataRoot
    {
      // -----------------------------------------------------------------
      // Load VTK library and print which library was not properly loaded
      static
      {
        if (!vtkNativeLibrary.LoadAllNativeLibraries())
        {
          for (vtkNativeLibrary lib : vtkNativeLibrary.values())
          {
            if (!lib.IsLoaded())
            {
              System.out.println(lib.GetLibraryName() + " not loaded");
            }
          }
        }
        vtkNativeLibrary.DisableOutputWindow(null);
      }
      // -----------------------------------------------------------------

      public static void main(String args[])
      {
       vtkTesting testHelper = new vtkTesting();
       String dataRoot = testHelper.GetDataRoot();

       System.out.print("DataRoot:" + " " + dataRoot);
      }
    }