Mittwoch, 12. Oktober 2016

getting Files and Directories of a Folder in BBj

showcase demonstrates how to get the used jasper version of BBj by using a complete scan of the lib directory files:
        declare f!
        declare BBjString path!
        path! = cast(BBjString,System.getProperty("basis.BBjHome")+"\lib\").replaceAll("/\\","\").replace("\\","\")
        f! = new path! )
        if (f!<>null()) then
          javaList! = java.util.Arrays.asList( f!.listFiles() )
          for i=0 to javaList!.size()-1
            f! = cast(,javaList!.get(i))
            if (!f!.isDirectory()) then
                if (f!.getName().contains("jasperreports-javaflow-")) then
                  jasperVersion$ = f!.getName().replaceAll("jasperreports-javaflow-|.jar","")
          next i
Benefit from the best Windows Desktop app in the world and use Strokey.Net!

Keine Kommentare:

Kommentar veröffentlichen