derez Expert Licensed User Longtime User Nov 24, 2013 #1 I want to list all the available drive letters of my pc. There are java method : java.io.File.listRoots() , and getRootDirectories() but how to I put it to b4j code ?
I want to list all the available drive letters of my pc. There are java method : java.io.File.listRoots() , and getRootDirectories() but how to I put it to b4j code ?
agraham Expert Licensed User Longtime User Nov 24, 2013 #2 Code: Copy Dim Obj As JavaObject Obj.InitializeStatic("java.io.File") Obj = Obj.RunMethod("listRoots",Null) Dim Files() As Object Files = Obj For i = 0 To Files.Length - 1 Log(Files(i)) Next Upvote 0
Code: Copy Dim Obj As JavaObject Obj.InitializeStatic("java.io.File") Obj = Obj.RunMethod("listRoots",Null) Dim Files() As Object Files = Obj For i = 0 To Files.Length - 1 Log(Files(i)) Next